Powered by Genkit & LLMs

Welcome Note Generator

Generate AI-powered welcome messages using Genkit and LLMs. From simple prompts to smart moderation—all streaming in real-time via SSE.

View Source
🔥 Genkit Flows ✨ Gemini AI ⚡ Real-time SSE 🛡️ AI Moderation
Live signal state
Datastar
activeTab
loading
has result
Streaming over SSE — patches arrive as soon as flows finish.

See It In Action

Watch how each flow version handles different use cases, from simple text generation to advanced AI-moderated content with natural language understanding.

V1 & V2

Simple & Structured Flows

Basic string input evolving to rich structured parameters with language, tone, and length control.

Simple to Structured Input

AI-powered text generation

Response time: ~1-2s
V3

Structured Output Flow

Returns rich metadata alongside generated content for complete transparency and debugging.

Metadata Output

Rich structured responses

Includes: Occasion, Language, Length, Tone
Safe Flow

AI-Moderated Content

Multi-step flow with content safety checking, toxicity filtering, and automatic sanitization.

Content Moderation

AI-powered safety filtering

Automatic toxicity detection & sanitization
Smart Flow

Natural Language Input

AI interprets free-form descriptions, extracts parameters, generates content, and moderates—all in one flow.

Smart Interpretation

Natural language understanding

3-step pipeline: Interpret → Generate → Moderate

Try Different Flow Versions

Explore our progressive implementations from simple string I/O to advanced AI-moderated smart flows. Each version builds on the previous, showcasing production-ready patterns.

Version 1: Simple Flow

Enter any occasion or context, and we'll generate a welcome note. This version is intentionally simple and sends your text directly to the AI.

Demo only. Text you enter is sent directly to the AI model and may produce unexpected or nonsensical output, especially for unusual or nonsensical inputs.

Something went wrong

Your Welcome Note

Version 2: Structured Input

Provide a specific occasion and customize the welcome note with language, length, and tone. This version uses structured inputs to give you more control.

Demo only. Your text and selections are sent directly to the AI model. Unusual or unclear inputs may still produce creative or unexpected results.

Something went wrong

Your Welcome Note

Version 3: Structured Output

Same as V2, but the flow returns a structured JSON response: the welcome note plus metadata about how it was generated (interpreted occasion, tone, sentiment, safety, etc.).

Demo only. Your text and selections are sent directly to the AI model. The response is parsed into typed JSON on the backend so you can inspect both the note and its metadata.

Something went wrong

Your Welcome Note

Generation Details

Occasion
Language
Length
Tone

Model Metadata

Interpreted occasion
Effective language
Effective length
Effective tone
Sentiment
Safety
Comments
View Raw JSON Response

Safe Flow: With Content Moderation

Includes automatic content safety checking and sanitization. Try requesting toxic or inappropriate content to see moderation in action.

Something went wrong

Your Welcome Note

Generation Details

Occasion
Language
Length
Tone

Model Metadata

Interpreted occasion
Effective language
Effective length
Effective tone
Sentiment
Safety
Comments
View Raw JSON Response
Content was sanitized

View original note (flagged)

Original text before sanitization:

Content blocked

No safe version could be generated from the original text.

Content Safety Check Passed

This note passed content safety filters. No changes were required.

Smart Flow: Natural Language Input

Just describe what you want in plain English. The AI will interpret your request, generate the note, and moderate it.

The AI will automatically extract the occasion, tone, length, and language from your description.

Something went wrong

Your Welcome Note (Smart Flow)

How the AI interpreted your description

Original description

Interpreted as
Occasion
Language
Length
Tone

Generation Details

Occasion
Language
Length
Tone

Model Metadata

Interpreted occasion
Effective language
Effective length
Effective tone
Sentiment
Safety
Comments
View Raw JSON Response
Content was sanitized

View original note (flagged)

Original text before sanitization:

Content blocked

No safe version could be generated from the original text.

Content Safety Check Passed

This note passed content safety filters. No changes were required.