AI Automation System

Multi-Model Joke Generation & AI Quality Selection

A multi-agent orchestration pattern: 3× GPT-5-mini generation → GPT-5 judge scoring → best output selection.
n8n OpenAI GPT-5-mini GPT-5 Merge (Append) AI-as-Judge

Context & Problem

Why multi-model evaluation

Large Language Models can generate creative content, but quality varies. If you rely on a single output, results are inconsistent.

Problem: No ranking layer, no validation, and no structured evaluation logic. A single model can produce weak jokes, even with a good prompt.

Goal: Generate 3 jokes using a lightweight model (GPT-5-mini), then use a stronger model (GPT-5) to score (1–10) and select the best one.

Implementation

Workflow orchestration

Implemented a multi-step orchestration workflow in n8n: Manual Trigger → 3 parallel GPT-5-mini nodes → Merge (append) → Merge (final) → GPT-5 judge with structured result.

  • Generation layer: 3 parallel prompts, each returns output_text
  • Aggregation layer: Merge (append) ensures exactly 3 items reach the judge
  • Evaluation layer: GPT-5 scores each joke and selects best #N with reason
  • Pattern: self-consistency sampling + AI-as-judge
Manual Trigger → 3× GPT-5-mini → Merge → Merge → GPT-5 Judge
Fig 1. Multi-model orchestration workflow in n8n
GPT-5-mini Prompt (Generator)
Generate 1 short joke (max 5 sentences).
Make it genuinely funny, unexpected, and playful.
Clean and safe.

Output ONLY the joke text.
Parallel GPT-5-mini generator nodes
Fig 2. Parallel GPT-5-mini joke generation nodes
Expected items after Merge
[
  { "output_text": "Joke #1..." },
  { "output_text": "Joke #2..." },
  { "output_text": "Joke #3..." }
]
Merge (append) + Merge final consolidation
Fig 3. Aggregation layer using Merge nodes
GPT-5 Judge Prompt
You will receive 3 items.
Each item contains one joke in field "output_text".

Score each joke 1–10.
Pick the best one.

Return structured result:

Joke 1 (score X/10)
Joke 2 (score X/10)
Joke 3 (score X/10)

Best joke: #N
Reason: short explanation
GPT-5 judge scoring and selection output
Fig 4. GPT-5 evaluation and structured selection output

Results & Impact

What this pattern enables
Technical
  • Multi-agent orchestration
  • Parallel LLM execution
  • Structured evaluation output
  • Deterministic formatting
Architectural Pattern
  • Self-consistency sampling
  • LLM ensemble evaluation
  • AI-as-judge selection
Business Use Cases
  • Marketing copy A/B selection
  • Ad headline testing
  • Email subject optimization
  • Content quality scoring
  • Moderation pipelines

Export Workflow

Download the n8n workflow JSON export and import it directly into your n8n instance.