Skip to main content

Iterative content refinement with GPT-4 multi-agent feedback system

Workflow preview

Workflow preview
100%
Iterative content refinement with GPT-4 multi-agent feedback system preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Who's it for This workflow is designed for users who want to implement iterative AI powered content improvement processes. It's ideal for content creators, marketers, product managers, and anyone w...

Best for

  • Content Creation automation workflows
  • Multimodal AI automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.agent, n8n-nodes-base.splitinbatches, n8n-nodes-base.if, n8n-nodes-base.set, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.manualtrigger

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Sebastian/OptiLever.

Original n8n.io source

1.1 Workflow description

Title
Iterative content refinement with GPT-4 multi-agent feedback system
Workflow name
Iterative content refinement with GPT-4 multi-agent feedback system

Who's it for

This workflow is designed for users who want to implement iterative AI-powered content improvement processes. It's ideal for content creators, marketers, product managers, and anyone who needs to refine ideas through multiple rounds of critique and enhancement until they meet quality standards.

How it works

The workflow creates a sophisticated feedback loop using three specialized AI agents that work together to continuously improve content. Starting with an initial input (like a product description), the system generates ideas and then enters a reasoning loop where:

A Critic Agent analyzes the current output and identifies flaws or areas for improvement A Refiner Agent takes the original input plus the critic's feedback to create enhanced versions An Evaluator Agent assesses the refined output and determines if it meets the quality threshold

The loop continues until either the evaluator determines the output is satisfactory or a maximum number of iterations is reached (configurable, default is 5 turns).

How to set up

  1. Configure the initial AI agent to generate your starting content
  2. Set up the loop structure with "Reset Loop" enabled in the loop node options
  3. Configure three AI agents within the loop:
  • Critic: Provide detailed analysis prompts for identifying improvements
  • Refiner: Create prompts that incorporate feedback to enhance content
  • Evaluator: Define quality criteria and decision-making logic
  1. Add Edit Fields nodes at the beginning and end of the loop to maintain data structure
  2. Include a Code node to track iteration count and loop control
  3. Set up the IF node to check exit conditions (max turns or completion status)

Requirements

n8n workflow environment Access to AI/LLM nodes (OpenAI, Anthropic, etc.) Basic understanding of JSON data structures Configured AI model credentials

How to customize the workflow Customize the system prompts for each agent based on your specific use case. The critic should focus on your quality criteria, the refiner should understand your improvement goals, and the evaluator should have clear success metrics. Adjust the maximum iteration count in the code node and IF condition based on your complexity needs and token budget considerations.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2

Block 2 - Loop Over Items

Type / Role
n8n-nodes-base.splitInBatches - splitInBatches
Config choices
Version 3

Block 3 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 4 - Critic Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2

Block 5 - Refiner Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2

Block 6 - Edit Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 7 - Code

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 8 - Edit Fields1

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 9 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 10 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.2

Block 11 - When clicking ‘Execute workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 12 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Evaluation agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2

3. Summary Table

Workflow Iterative content refinement with GPT-4 multi-agent feedback system
Complexity intermediate
Nodes 13
Categories Content Creation, Multimodal AI
Author Sebastian/OptiLever
Published 02 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/5597/5597.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Iterative content refinement with GPT-4 multi-agent feedback system do?

Who's it for This workflow is designed for users who want to implement iterative AI powered content improvement processes. It's ideal for content creators, marketers, product managers, and anyone w...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Content Creation, Multimodal AI use case.