What This Workflow Does
Evaluating and comparing responses from multiple LLMs (OpenAI, Claude, Gemini) can be challenging when done manually. Each model produces outputs with different strengths in creativity, accuracy, and style, making objective comparison difficult without standardized evaluation criteria.
This n8n workflow automates the comparison process using Contextual AI's LMUnit evaluation framework. It simultaneously queries multiple AI models with the same prompt, collects their responses, and applies standardized metrics to objectively assess which model performs best for your specific use case.
How It Works
1. Input Prompt Distribution
The workflow takes your input prompt and sends it simultaneously to GPT-4, Claude, and Gemini through their respective APIs. This ensures all models receive identical input for fair comparison.
2. Response Collection
Responses from all three models are collected and formatted consistently. The workflow normalizes output length and structure to enable accurate comparison across different model response styles.
3. LMUnit Evaluation
Contextual AI's LMUnit framework analyzes each response across multiple dimensions including relevance, coherence, factual accuracy, and stylistic appropriateness. The evaluation produces quantitative scores for objective comparison.
4. Comparative Analysis
The workflow generates a side-by-side comparison report highlighting strengths and weaknesses of each model's response. Results can be delivered via email, saved to a database, or integrated with your existing systems.
Who This Is For
This workflow is ideal for content teams, marketing agencies, customer support operations, and any business regularly using multiple AI models. It's particularly valuable for:
- Content teams creating marketing copy or blog posts
- Customer support managers optimizing chatbot responses
- Technical writers producing documentation
- AI product teams benchmarking model performance
What You'll Need
- Active API keys for OpenAI (GPT-4), Anthropic (Claude), and Google (Gemini)
- Access to Contextual AI's LMUnit evaluation framework
- An n8n instance (self-hosted or cloud)
- A destination for comparison reports (email, database, or webhook)
Quick Setup Guide
- Download the JSON template file
- Import into your n8n instance
- Configure API credentials for all three AI services
- Set up LMUnit evaluation parameters
- Define your output destination (email, database, etc.)
- Test with sample prompts to verify operation
Key Benefits
Save 5-10 hours per week by automating what would otherwise be a manual comparison process requiring careful reading and subjective evaluation of each model's output.
Reduce API costs by 15-30% by identifying which model delivers the best quality-to-cost ratio for your specific use cases, eliminating unnecessary spending on overqualified models.
Improve content quality consistency with data-driven model selection based on objective metrics rather than guesswork or anecdotal experience.
Maintain compliance with AI governance policies by documenting model evaluation and selection criteria through standardized reporting.
Pro tip: Run this workflow monthly to track how model performance changes over time as providers update their algorithms.