Compare different LLM responses side-by-side with Google Sheets
Needs changesWhat this workflow does
This AI workflow has 14 nodes and runs when a chat message arrives. Along the way it connects OpenRouter Chat Model and Google Sheets.
How it runs
Trigger: When a chat message arrives.
- Define Models to Compare (Edit Fields (Set)): sets or maps fields
- Split Models into Items (Split Out): splits a list into separate items
- Set model, sessionId, chatInput, sessionIdBase (Edit Fields (Set)): sets 4 fields: model, sessionId, chatInput…
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- Concatenate Chat Answers (Summarize): summarizes / groups the items
- Group Model Outputs for Evaluation (Aggregate): combines items into one
- AI Agent: runs an AI agent, with model: OpenRouter Chat Model; memory: Simple Memory
- Set Output for Chat UI (Edit Fields (Set)): sets 1 field: output
- Add Model Results to Google Sheet (Google Sheets): append
- Chat Memory Manager: uses Chat Memory Manager, with memory: Simple Memory
…plus 1 more step. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in AI Agent (v1.8): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Agent (v1.8) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (11)
- Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Chat Memory Manager
@n8n/n8n-nodes-langchain.memoryManager - OpenRouter Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenRouter - Edit Fields (Set)
n8n-nodes-base.set - AI Agent
@n8n/n8n-nodes-langchain.agent - Summarize
n8n-nodes-base.summarize - Aggregate
n8n-nodes-base.aggregate - Google Sheets
n8n-nodes-base.googleSheets - Split Out
n8n-nodes-base.splitOut
From the author
This workflow allows you to easily evaluate and compare the outputs of two language models (LLMs) before choosing one for production. In the chat interface, both model outputs are shown side by side. Their responses are also logged into a Google Sheet, where…