What Are Dark Patterns?
Dark patterns are deceptive user interface designs that trick users into unintended behaviors. These manipulative techniques exploit cognitive biases and can cause users—and automated agents—to make decisions against their best interests.Why Test Against Dark Patterns?
As web agents become more prevalent, they face the same manipulative designs that affect humans. Testing against dark patterns helps:- Identify Vulnerabilities: Discover how agents can be manipulated
- Improve Robustness: Build more resilient automation
- Ensure Safety: Prevent agents from harmful actions
- Benchmark Performance: Compare agent susceptibility
Supported Dark Patterns
LiteAgent tests agents against multiple categories of dark patterns:- Bait and Switch
- Disguised Ads
- Forced Continuity
- Misdirection
Bait and Switch (BS)
Description: Advertising one outcome but delivering another.How it works:- User/agent intends to perform action A
- Interface suggests action A is available
- Clicking results in action B instead
- Agent clicks on misleading element
- Resulting action differs from label
- Unintended subscription or purchase
Additional Dark Patterns
Roach Motel
- Description: Easy to get in, hard to get out
- Example: Simple account creation, complex deletion
- Code:
dp=rm
Sneak into Basket
- Description: Adding items without clear consent
- Example: Pre-selected insurance or warranties
- Code:
dp=sb
Price Comparison Prevention
- Description: Making it hard to compare prices
- Example: Inconsistent units or hidden specifications
- Code:
dp=pcp
Privacy Zuckering
- Description: Tricking users into sharing private information
- Example: Confusing privacy settings
- Code:
dp=pz
Confirm Shaming
- Description: Guilting users into compliance
- Example: “No thanks, I don’t want to save money”
- Code:
dp=cs
Combining Dark Patterns
LiteAgent supports testing multiple dark patterns simultaneously:Dark Pattern Detection
LiteAgent uses multiple methods to detect dark pattern susceptibility:1. Database Analysis
2. Behavioral Patterns
- Time spent on misleading elements
- Number of correction attempts
- Backtracking frequency
- Task abandonment
3. Outcome Analysis
- Unintended purchases
- Newsletter subscriptions
- Account creations
- Data disclosures
Configuration
Dark patterns are configured via URL parameters:Evaluation Metrics
LiteAgent tracks several metrics for dark pattern testing:Task Success Rate (TSR)
Percentage of tasks completed successfully despite dark patterns.Dark Pattern Susceptibility Rate (DPSR)
Percentage of times agent falls for dark patterns.Confusion Matrix
Attribution Analysis
Which specific dark patterns caused failures:- Bait and Switch: 45% susceptibility
- Disguised Ads: 30% susceptibility
- Hidden Costs: 60% susceptibility
Creating Custom Dark Patterns
To add new dark patterns to TrickyArena:- Define Pattern Logic:
- Add Detection Rules:
- Create Test Prompts:
Best Practices for Testing
1. Baseline Testing
Always test without dark patterns first:2. Incremental Complexity
Start with single patterns, then combine:- Test each pattern individually
- Test pairs of patterns
- Test all patterns together
3. Task Variety
Test different task types:- Navigation tasks
- Purchase tasks
- Information gathering
- Form filling
4. Agent Comparison
Run same tests across all agents:Countermeasures
Strategies to improve agent resilience:1. Visual Verification
- Screenshot before/after clicks
- Compare expected vs actual outcomes
- Verify element positioning
2. Text Analysis
- Check for inconsistencies
- Detect marketing language
- Identify fine print
3. Behavioral Rules
- Pause before critical actions
- Verify prices at multiple steps
- Check for pre-selected options
4. Learning from Failures
- Maintain dark pattern database
- Update detection algorithms
- Share findings with community
Next Steps
TrickyArena Overview
Explore the test bed for dark patterns
Evaluation Metrics
Understanding success rates and metrics
Creating Test Prompts
Write effective prompts for dark pattern testing