Block 1 - When chat message received
- Type / Role
- @n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
- Config choices
- Version 1.1
This workflow is provided as-is. Please review and test before using in production.
Split Test AI Prompts Using Supabase & Langchain Agent This workflow allows you to A/B test different prompts for an AI chatbot powered by Langchain and OpenAI. It uses Supa...
@n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.supabase, n8n-nodes-base.if, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.memorypostgreschat, n8n-nodes-base.stickynote
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by vanhon.
Original n8n.io sourceThis workflow allows you to A/B test different prompts for an AI chatbot powered by Langchain and OpenAI. It uses Supabase to persist session state and randomly assigns users to either a baseline or alternative prompt, ensuring consistent prompt usage across the conversation.
Prompt optimization is crucial for maximizing the performance of AI assistants. This workflow helps you run controlled experiments on different prompt versions, giving you a reliable way to compare performance over time.
split_test_sessions with the following columns:session_id (text)show_alternative (boolean)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.
| Workflow | A/B test AI prompts with Supabase, Langchain Agent & OpenAI GPT-4o |
|---|---|
| Complexity | advanced |
| Nodes | 16 |
| Categories | Engineering, AI Chatbot |
| Author | vanhon |
| Published | 21 Sept 2025 |
Use the JSON export at /data/workflows/8790/8790.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
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.
Split Test AI Prompts Using Supabase & Langchain Agent This workflow allows you to A/B test different prompts for an AI chatbot powered by Langchain and OpenAI. It uses Supa...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
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 Chatbot use case.