Create and test prompts with few-shot examples. Evaluate AI responses and tune model performance through experimentation.
Use this when you need to write a prompt with editable input/output examples and test it against sample cases before using it.
Similar patterns, and when each one is the better fit.

Generate TextFreeUse this when you need a minimal API route that calls an AI Gateway model with generateText and returns one finished plain text response.
OpenAI Prompt Caching (AI Gateway)Use this when your OpenAI agent resends the same system prompt each turn and you want to cache it through AI Gateway using promptCacheKey.
AI Wizard Brand StrategyUse this when you are building a brand discovery or marketing onboarding flow where AI interviews gate progress and end in a written strategy.
AI SDK Nano Banana Image EditUse this when you need to edit an uploaded image with plain-language instructions and keep a version history to compare before and after results.Requirements, wiring steps, and what this pattern adds to your project.
Pick how you want to pull this pattern in. Then wire env vars and routes the same way.
Download → Next.js app
Use Download → Next.js app in the preview toolbar. You get a zip scaffold (Pro downloads rewrite preview `/view/.../api/*` paths to `/api/*` automatically).
Extract the zip and install dependencies
Unzip the archive, then run `pnpm install` (or npm / yarn) in the project folder.
Fill .env.local
The download includes .env.local placeholders when needed. Add real values for: OPENAI_API_KEY.
Customize the agent and tool files
Adapt prompts, tools, and stop conditions in the generated project for your product.
Run the app and open the pattern route
Run `pnpm dev`, open the setup/checklist page if present, then navigate to the generated pattern route and verify responses.
OPENAI_API_KEYGet keyAI SDK APIs
generateObjectgenerateTextapp/page.tsxapp/layout.tsxapp/actions.tsxlib/rate-limit.tsnpm packages
10
Registry components
app/actions.tsxCore AI pipeline: uses generateObject and generateText with OpenAI to evaluate few-shot prompts (scoring consistency/relevance/quality) and generate improved examples.
lib/schema.tsDefines Zod schemas that drive the AI structured output: evaluationResultSchema, improvedExamplesSchema, promptFormSchema, and default example sets for extraction/classification/summarization tasks.
Create and test prompts with few-shot examples. Evaluate AI responses and tune model performance through experimentation.
Use this when you need to write a prompt with editable input/output examples and test it against sample cases before using it.
Similar patterns, and when each one is the better fit.

Generate TextFreeUse this when you need a minimal API route that calls an AI Gateway model with generateText and returns one finished plain text response.
OpenAI Prompt Caching (AI Gateway)Use this when your OpenAI agent resends the same system prompt each turn and you want to cache it through AI Gateway using promptCacheKey.
AI Wizard Brand StrategyUse this when you are building a brand discovery or marketing onboarding flow where AI interviews gate progress and end in a written strategy.
AI SDK Nano Banana Image EditUse this when you need to edit an uploaded image with plain-language instructions and keep a version history to compare before and after results.Requirements, wiring steps, and what this pattern adds to your project.
Pick how you want to pull this pattern in. Then wire env vars and routes the same way.
Download → Next.js app
Use Download → Next.js app in the preview toolbar. You get a zip scaffold (Pro downloads rewrite preview `/view/.../api/*` paths to `/api/*` automatically).
Extract the zip and install dependencies
Unzip the archive, then run `pnpm install` (or npm / yarn) in the project folder.
Fill .env.local
The download includes .env.local placeholders when needed. Add real values for: OPENAI_API_KEY.
Customize the agent and tool files
Adapt prompts, tools, and stop conditions in the generated project for your product.
Run the app and open the pattern route
Run `pnpm dev`, open the setup/checklist page if present, then navigate to the generated pattern route and verify responses.
OPENAI_API_KEYGet keyAI SDK APIs
generateObjectgenerateTextapp/page.tsxapp/layout.tsxapp/actions.tsxlib/rate-limit.tsnpm packages
10
Registry components
app/actions.tsxCore AI pipeline: uses generateObject and generateText with OpenAI to evaluate few-shot prompts (scoring consistency/relevance/quality) and generate improved examples.
lib/schema.tsDefines Zod schemas that drive the AI structured output: evaluationResultSchema, improvedExamplesSchema, promptFormSchema, and default example sets for extraction/classification/summarization tasks.
Loading preview…
Early-bird pricing — limited time


Open on desktop for the interactive preview.
Create and test prompts with few-shot examples. Evaluate AI responses and tune model performance through experimentation.
Loading preview…
Early-bird pricing — limited time


Open on desktop for the interactive preview.
Create and test prompts with few-shot examples. Evaluate AI responses and tune model performance through experimentation.