Overview
A/B testing (also called split testing) lets you compare multiple prompt versions to see which performs better. Switchport provides deterministic routing so users get a consistent experience.How It Works
- Create multiple versions of a prompt in the dashboard
- Set up a traffic config to distribute users across versions
- Execute prompts with user identification to get deterministic version assignment
- Record metrics to measure performance
- Analyze results in the dashboard to identify winners
Creating Multiple Versions
In the Switchport dashboard:Create first version
- Click Add Version
- Name:
v1orformal-tone - Set model and prompt template
- Click Save and Publish
Create second version
- Click Add Version again
- Name:
v2orcasual-tone - Use different wording or approach
- Click Save and Publish
Executing Prompts with A/B Testing
The key to A/B testing is using subject for deterministic routing:The same subject always returns the same version. This ensures users have a consistent experience across sessions.
Recording Metrics for A/B Tests
To compare versions, record metrics with the same subject:- Links the metric to the version that subject saw
- Aggregates metrics per version
- Calculates averages, success rates, and distributions
Traffic Distribution
You can distribute traffic in various ways:50/50 Split (Classic A/B)
Multivariate Testing (A/B/C)
Gradual Rollout
Start with a small percentage on the new version:Complete Example: Email A/B Test
Analyzing Results
In the Switchport dashboard, you can view:- Metric averages per version: See which version has higher satisfaction scores
- Conversion rates: Compare success rates for boolean metrics
- Sample sizes: Ensure statistical significance
- Confidence intervals: Understand the reliability of results
Best Practices
Use consistent subject
Use consistent subject
Always use the same subject (e.g., user ID) for a given user across all prompt executions and metric recordings.
Start with 50/50 splits
Start with 50/50 splits
For initial A/B tests, use even splits to gather data faster.
Run tests long enough
Run tests long enough
Ensure you have enough data for statistical significance before declaring a winner.
Test one thing at a time
Test one thing at a time
Change only one variable between versions to understand what drives performance differences.
Use gradual rollouts
Use gradual rollouts
For new versions, start with a small percentage to minimize risk.
Define success metrics upfront
Define success metrics upfront
Decide what metrics matter before running the test to avoid cherry-picking results.
Monitor for regressions
Monitor for regressions
Watch for unexpected drops in other metrics when optimizing for one specific metric.
Common Use Cases
Email Marketing
Test subject lines, tone, call-to-action wording:Customer Support Chatbot
Test different conversation styles:Product Descriptions
Test different description styles:Next Steps
Examples
See complete A/B testing examples
Metrics Reference
Learn more about recording metrics

