Skip to content
NEWMarketplace and the trig8n Agent: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / AI Agents & Assistants

AI Agents & Assistants

A/B Test AI Chat Prompts with OpenAI and Supabase

When a chat message arrives, it assigns each session to a prompt variant stored in Supabase and answers with an OpenAI agent using that path.

What it does

# A/B Split Testing ## Overview Automated workflow: A/B Split Testing. This workflow integrates 9 different services: stickyNote, agent, memoryPostgresChat, set, stopAndError. It contains 17 nodes and follows best practices for error handling and security. ## Workflow Details - Total Nodes: 17 - Node Types: 9 - Error Handling: ✅ Implemented - Security: ✅ Hardened (no sensitive data) - Documentation: ✅ Complete ## Node Breakdown - When chat message received: chatTrigger - AI Agent: agent - Check If Session Exists: supabase - If Session Does Exist: if - Assign Path To Session: supabase - Define Path Values: set - OpenAI Chat Model: lmChatOpenAi - Postgres Chat Memory: memoryPostgresChat - Sticky Note1: stickyNote - Sticky Note: stickyNote - ... and 7 more nodes ## Usage Instructions 1. Configure Credentials: Set up all required API keys and credentials 2. Update Variables: Replace any placeholder values with actual data 3. Test Workflow: Run in test mode to verify functionality 4. Deploy: Activate the workflow for production use ## Security Notes - All sensitive data has been removed or replaced with placeholders - Error handling is implemented for reliability - Follow security best practices when configuring credentials ## Troubleshooting - Check error logs if workflow fails - Verify all credentials are properly configured - Ensure all required services are accessible

The steps

  1. Manual Trigger
  2. When chat message received
  3. AI Agent
  4. Check If Session Exists
  5. If Session Does Exist
  6. Assign Path To Session
  7. Define Path Values
  8. OpenAI Chat Model
  9. Postgres Chat Memory
  10. Get Correct Prompt
  11. Error Handler for 23c1b4e2
  12. Error Handler

Similar automations