Compare two Large Language Models (LLMs) simultaneously and log their outputs, context, and user input to Google Sheets using this advanced n8n workflow. Ideal for AI model evaluation.
Download this n8n workflow template and start using it instantly.
AI Developers and Engineers needing to benchmark LLM performance.
Teams requiring a structured way to manually evaluate AI responses in a shared document (Google Sheets).
Users looking for advanced n8n templates utilizing LangChain and LLM comparison techniques.
Automation specialists wanting to implement a complex, looping n8n node structure.
Determining the best Large Language Model (LLM) for a specific production task is challenging due to their non-deterministic nature. This specialized n8n workflow solves this by allowing developers to send a single prompt to two different models concurrently. It captures the user input, the complete conversational context (using isolated memory), and both model responses, logging everything instantly to Google Sheets. This setup provides an objective, side-by-side view for quick quality assessment and ensures that your final AI Agent performs optimally. This powerful n8n workflow configuration is essential for rigorous testing.
The process initiates when a user sends a message, activating the When chat message received n8n trigger.
Define Models to Compare n8n node sets an array of two LLM IDs (e.g., using OpenRouter). The Split Models into Items n8n node then breaks this array into individual items, one for each model.Set model, sessionId, chatInput, sessionIdBase n8n node dynamically creates a unique session ID for each model iteration, ensuring that Model A and Model B maintain separate, isolated conversational memory contexts via the Simple Memory n8n node.AI Agent, which utilizes the specified OpenRouter Chat Model for generation.Prepare Data for Chat and Google Sheets n8n node formats the model's response for display in the chat interface and extracts crucial data points (answer, context history) for logging.Loop Over Items node exits the batch. The Concatenate Chat Answers n8n node combines the two distinct LLM outputs (formatted with separators) and sends this combined response back to the chat UI.Group Model Outputs for Evaluation n8n node gathers the full comparison data (input, Model 1 answer, Model 2 answer, context for both) into one structure. This is immediately appended to the designated Google Sheet using the Add Model Results to Google Sheet n8n node, finalizing the data collection process in this robust n8n workflow.To deploy this comprehensive n8n workflow, follow these steps:
sessionId, userinput, model1answer, model2_answer, etc.).OpenRouter Chat Model n8n node.Add Model Results to Google Sheet n8n node.Add Model Results to Google Sheet n8n node parameters, ensuring the correct Document ID and Sheet Name (e.g., gid=0) are selected based on your setup.Define Models to Compare n8n node, update the array of model strings (e.g., ["model/a", "model/b"]) to reflect the specific LLMs you wish to compare using your configured provider. When chat message received (n8n trigger): The starting point. It captures the user's input from the integrated chat interface.
Define Models to Compare (Set n8n node): Holds the critical array of model IDs (e.g., openai/gpt-4.1 and mistralai/mistral-large) that will be tested in parallel. A key configuration point in this n8n template.
Split Models into Items (Split Out n8n node): Converts the array of models into separate execution paths, enabling parallel processing.
Set model, sessionId, chatInput, sessionIdBase (Set n8n node): Crucial for memory management. It creates a unique, model-specific sessionId (combining the base session ID and the model name) to isolate the context for each LLM.
OpenRouter Chat Model / AI Agent (n8n nodes): These nodes handle the communication with the LLM API using the dynamically set model ID, processing the input, and generating the response using the isolated context provided by the Simple Memory n8n node.
Add Model Results to Google Sheet (Google Sheets n8n node): Performs the final action, using the append operation to log all collected comparison data (user input, model answers, context) into the designated spreadsheet row. This n8n node is configured to handle potential errors (onError: continueRegularOutput).
Use this powerful n8n workflow to compare responses from four major AI models (Qwen, DeepSeek, Seed-OSS, Nemotron) simultaneously using the Nvidia API. Ideal for fast ensemble intelligence.

Use this comprehensive n8n workflow to monitor community platforms (Reddit and Discourse forums). It scrapes data, classifies posts, uses OpenRouter AI to summarize user problems, and delivers daily digests via email. Get started with n8n templates today.

Deploy a versatile n8n workflow using a Telegram trigger and OpenAI. This n8n template handles dynamic command routing for automated article summarization and image prompt processing.

Automate real-time flight fare checking across Skyscanner, Air India, IndiGo, and more using this powerful n8n workflow. Get instant, sorted email alerts for the cheapest deals delivered straight to your inbox.

Use this powerful n8n workflow template to automatically compare flight prices across Kayak, Skyscanner, Expedia, and Google Flights via a webhook, sending a detailed email report to the user.

I am passionate about transforming complex processes into seamless automations with n8n. My expertise spans across creating ETL pipelines, sales automations, and data & AI-driven workflows. As an avid problem solver, I thrive on optimizing workflows to drive efficiency and innovation.







































