Testing with Chatlab
Chatlab is your private testing environment where you can chat with your agent, test flows, and debug issues before customers ever see them. It’s essential for catching problems early and ensuring quality conversations.What is Chatlab?
Chatlab is a sandboxed chat interface built directly into ChatCrafterAI. It replicates your live agent experience exactly—same AI, same knowledge base, same flows—but nothing goes live until you approve it. Why use Chatlab?- Catch errors early - Find issues before deployment
- Test AI responses - Verify answer quality and accuracy
- Validate flows - Ensure buttons, forms, and logic work correctly
- Check integrations - Test Stripe payments, Shopify lookups, etc. in test mode
- Verify personality - Make sure your agent sounds right
- Test edge cases - See how agent handles unusual inputs
- No customer impact - All testing is private and won’t affect real users
Access Chatlab
Opening Chatlab takes 30 seconds:- Navigate to your agent on the dashboard
- Click “Chatlab” button in the top-right corner
- Start typing your test messages in the chat window
- Watch responses appear with full debugging information
- Review logs to understand what’s happening
What You Can Test
Knowledge Base Testing
Your agent should accurately answer questions from your uploaded documents. Here’s what to test:- Direct questions - “What is your refund policy?” → Should return accurate answer
- Variations - Ask the same question differently → Same answer
- Partial knowledge - Ask about related topics → Should acknowledge limitations
- Out of scope - Ask something not in your KB → Should politely say it doesn’t know
- Multi-document answers - Does it combine info from multiple sources? → Test compound questions
Flow & Button Testing
If you’re using Rich-Only or Hybrid mode with predefined flows:- Button clicks - Do all buttons work and lead to correct paths?
- Form submission - Can users fill forms and submit data?
- Conditional logic - Does flow branch correctly based on user input?
- Error handling - What happens if user submits incomplete form?
- Flow loops - Can user ask clarifying questions within a flow?
- Navigation - Can user go back or exit a flow?
Integration Testing
Test real-world integrations in safe test mode: Stripe Payments- Try checkout flow with test card numbers
- Verify amount is correct
- Check invoice creation
- Test card decline scenarios
- Ask for specific products by name
- Verify product details are accurate
- Check if inventory is current
- Test with products that don’t exist
- Trigger ticket creation
- Verify ticket appears in Zendesk
- Check ticket details are captured correctly
- Test custom fields and metadata
Personality & Tone
Verify your agent’s personality aligns with your brand:- Professionalism level - Is it too casual? Too formal?
- Response length - Are answers concise or rambling?
- Helpfulness - Does it proactively offer next steps?
- Error messages - When agent can’t help, is it graceful?
- Humor/warmth - Does personality feel authentic?
Edge Cases & Error Scenarios
Test unusual situations:- Very long questions (100+ words) - Does AI still understand?
- Nonsense input (“aslkdjfl hkj”) - Graceful error handling?
- Repeated requests - Can user ask same thing multiple times?
- Rapid clicking - What if user clicks buttons 10 times fast?
- Special characters - How does agent handle emojis, symbols?
- Different languages - If multilingual, test each language
Debug Mode - Understanding What’s Happening
Chatlab’s debug panel shows exactly how your agent processes each message:Debug Panel Shows:
1. AI Prompt Sent- Exact system prompt your agent received
- User message sent to AI
- Context and parameters used
- Which documents were searched
- Relevance score for each match
- How many chunks were retrieved
- Actual text sent to AI as context
- Which flow pattern matched (if any)
- Confidence score of the match
- What variables were captured
- API calls made to Stripe, Shopify, etc.
- Response codes (200 = success, 4xx = error)
- Data returned from integrations
- Why a knowledge base search failed
- Why a flow didn’t trigger
- Why an integration call failed
- Specific error codes with explanations
Testing Workflow
Follow this systematic approach:Step 1: Knowledge Base Validation (15 minutes)
- Ask 10 common questions your customers will ask
- Verify each answer is accurate
- Check response quality and relevance
- Note any missing information
Step 2: Flow Testing (10 minutes)
- Click through each button path
- Fill out every form
- Test all conditional logic
- Verify form data is captured
Step 3: Integration Testing (10 minutes)
- Process a test Stripe payment
- Look up a test Shopify product
- Create a test Zendesk ticket
- Verify data appears correctly
Step 4: Personality Check (5 minutes)
- Read 5 responses aloud
- Do they sound like your brand?
- Are they helpful and friendly?
- Any grammar or tone issues?
Step 5: Edge Case Testing (10 minutes)
- Send weird input
- Rapid-click buttons
- Try long questions
- Test multilingual if applicable
Tips for Effective Testing
Document issues as you find them- Take screenshots of problem areas
- Note exact questions that break the agent
- Record steps to reproduce each issue
- Don’t just test “happy paths”
- Ask confusing questions
- Try things the “wrong way”
- Think like someone frustrated
- Open widget on phone/tablet
- Verify responsive layout works
- Check button sizes are clickable
- Test on different browsers
- Fresh eyes catch things you miss
- Non-experts expose confusing behavior
- Get honest feedback on personality
- Each issue you find now = saved customer frustration later
- Plan to spend 30-60 minutes testing before first deploy
- Re-test after making changes
Common Issues Found in Testing
Problem: Agent gives irrelevant answers- Cause: Knowledge base has too much similar content
- Fix: Improve chunk separation, add clearer headings
- Cause: Conditional logic is too strict
- Fix: Review flow requirements, simplify form fields
- Cause: API keys wrong or test mode not enabled
- Fix: Verify integration setup, check API credentials
- Cause: Knowledge base is too large or needs optimization
- Fix: Optimize chunks, reduce KB size, improve document quality
- Cause: System prompt too generic
- Fix: Refine system prompt with specific brand voice guidelines
Deploy When Confident
Once you’ve tested thoroughly and fixed issues:- Review your test results - Any remaining concerns?
- Get approval - Have team review agent behavior?
- Click “Deploy to Live” - Make agent live on selected channels
- Monitor first 24 hours - Check analytics for issues
- Keep testing post-launch - Real usage will reveal new scenarios
Done testing? Next: Multi-Channel Deployment