Skip to main content

Generate consensus-based answers using Claude, GPT, Grok and Gemini

Workflow preview

Workflow preview
100%
Generate consensus-based answers using Claude, GPT, Grok and Gemini preview
Open on n8n.io

1. Workflow Overview

The original LLM Council concept was introduced by Andrej Karpathy and published as an open source repository demonstrating multi model consensus and ranking. This workflow is my adaptation of that...

Best for

  • Engineering automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

@n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.chainllm, n8n-nodes-base.merge, @n8n/n8n-nodes-langchain.lmchatopenrouter, n8n-nodes-base.set, n8n-nodes-base.code, n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.lmchatanthropic

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Yehor EGMS.

Original n8n.io source

1.1 Workflow description

Title
Generate consensus-based answers using Claude, GPT, Grok and Gemini
Workflow name
Generate consensus-based answers using Claude, GPT, Grok and Gemini

The original LLM Council concept was introduced by Andrej Karpathy and published as an open-source repository demonstrating multi-model consensus and ranking. This workflow is my adaptation of that original idea, reimplemented and structured as a production-ready n8n template. Original repository - https://github.com/karpathy/llm-council

This n8n template implements the LLM Council pattern: a single user question is processed in parallel by multiple large language models, independently evaluated by peer models, and then synthesized into one high-quality, consensus-driven final answer. It is designed for use cases where answer quality, balance, and reduced single-model bias are critical.

๐Ÿ“Œ Section 1: Trigger & Input

โšก When Chat Message Received (Chat Trigger) Purpose: Receives a userโ€™s message and initiates the entire workflow.

How it works:

A user sends a chat message

The message is stored as the Original Question

The same input is forwarded simultaneously to multiple LLM pipelines

Why it matters: Provides a clean, unified entry point for all downstream multi-model logic.

๐Ÿ“Œ Section 2: Stage 1 โ€” Parallel LLM Responses

๐Ÿค– Basic LLM Chains (x4) Models used:

Anthropic Claude

OpenAI GPT

xAI Grok

Google Gemini

Purpose: Each model independently generates its own response to the same question.

Key characteristics:

Identical prompt structure for all models

Independent reasoning paths

No shared context between models

Why it matters: Produces diverse perspectives, reasoning styles, and solution approaches.

๐Ÿ“Œ Section 3: Stage 2 โ€” Response Anonymization

๐Ÿงพ Set Nodes (Response A / B / C / D) Purpose: Stores model outputs in an anonymized format:

Response A

Response B

Response C

Response D

Why it matters: Prevents evaluator models from knowing which LLM authored which response, reducing bias during evaluation.

๐Ÿ“Œ Section 4: Stage 3 โ€” Peer Evaluation & Ranking

๐Ÿ“Š Evaluation Chains (Claude / GPT / Grok / Gemini) Purpose: Each model acts as a reviewer and:

Analyzes all four anonymized responses

Describes strengths and weaknesses of each

Produces a strict FINAL RANKING from best to worst

Ranking format (strict):

FINAL RANKING:

  1. Response B
  2. Response A
  3. Response D
  4. Response C

Why it matters: Creates multiple independent quality assessments from different model perspectives.

๐Ÿ“Œ Section 5: Stage 4 โ€” Ranking Aggregation

๐Ÿงฎ Code Node (JavaScript) Purpose: Aggregates all peer rankings by:

Parsing ranking positions

Calculating average position per response

Counting evaluation occurrences

Sorting responses by best average score

Output includes:

Aggregated rankings

Best response label

Best average score

Why it matters: Transforms subjective rankings into a structured, quantitative consensus.

๐Ÿ“Œ Section 6: Stage 5 โ€” Final Consensus Answer

๐Ÿง  Chairman LLM Chain Purpose: One model acts as the Council Chairman and:

Reviews all original responses

Considers peer rankings and aggregated scores

Identifies consensus patterns and disagreements

Produces a single, clear, high-quality final answer

Why it matters: Delivers a refined response that reflects collective model intelligence rather than a simple average.

๐Ÿ“Š Workflow Overview Stage Node / Logic Purpose 1 Chat Trigger Receive user question 2 LLM Chains Generate independent responses 3 Set Nodes Anonymize outputs 4 Evaluation Chains Peer review & ranking 5 Code Node Aggregate rankings 6 Chairman LLM Final synthesized answer ๐ŸŽฏ Key Benefits

๐Ÿง  Multi-model intelligence โ€” avoids reliance on a single LLM โš–๏ธ Reduced bias โ€” anonymized peer evaluation ๐Ÿ“Š Quality-driven selection โ€” ranking-based consensus ๐Ÿ” Modular architecture โ€” easy to add or replace models ๐ŸŒ Language-flexible โ€” input and output languages configurable ๐Ÿงฉ Production-ready logic โ€” clear stages, deterministic ranking

๐Ÿš€ Ideal Use Cases

High-stakes decision support

Complex technical or architectural questions

Strategy and research synthesis

AI assistants requiring higher trust and reliability

Comparing and selecting the best LLM-generated answers

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 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.4

Block 2 - Basic LLM Chain

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.7

Block 3 - Basic LLM Chain1

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.7

Block 4 - Basic LLM Chain2

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.7

Block 5 - Basic LLM Chain3

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.7

Block 6 - Merge

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 7 - Merge1

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 8 - Merge3

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 9 - gemini1

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenRouter - lmChatOpenRouter
Config choices
Version 1

Block 10 - Merge4

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 11 - Basic LLM Chain8

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.7

Block 12 - response a

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

Block 13 - response b

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

Block 14 - response c

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

Block 15 - response d

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

Block 16 - Code in JavaScript

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

Block 17 - claude3

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenRouter - lmChatOpenRouter
Config choices
Version 1

Block 18 - openAI2

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenRouter - lmChatOpenRouter
Config choices
Version 1

Block 19 - groq1

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenRouter - lmChatOpenRouter
Config choices
Version 1

Block 20 - Merge5

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 21 - claude4

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenRouter - lmChatOpenRouter
Config choices
Version 1

Block 22 - evaluate claude

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.7

Block 23 - evaluate grok

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.7

Block 24 - evaluate gemini

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.7

Showing the first 24 of 52 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Generate consensus-based answers using Claude, GPT, Grok and Gemini
Complexity advanced
Nodes 52
Categories Engineering, AI Summarization
Author Yehor EGMS
Published 05 Jan 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12471/12471.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 Generate consensus-based answers using Claude, GPT, Grok and Gemini do?

The original LLM Council concept was introduced by Andrej Karpathy and published as an open source repository demonstrating multi model consensus and ranking. This workflow is my adaptation of that...

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 Engineering, AI Summarization use case.