Testing Your Chatflow
Interactive Chat Interface
The quickest way to test your chatflow is using the built-in chat interface:Open Chat Interface
Click the chat bubble icon in the bottom-right corner of the canvas. This opens a collapsible chat panel.
Start a Conversation
- Type a message and press Enter
- The message flows through your chatflow
- Response appears in the chat interface
- View streaming responses in real-time
Test Different Scenarios
Try various inputs to validate behavior:
- Edge cases (empty input, very long input)
- Different question types
- Multi-turn conversations (if using memory)
- Tool invocations (if using agents)
- File uploads (if supported)
The chat interface uses session storage. Each browser tab has an independent session, useful for testing multiple scenarios simultaneously.
Expanded Chat View
For more detailed testing, use the expanded chat interface:Advanced Features
The expanded view provides:
- Larger conversation area
- Message timestamps
- Better visibility for long responses
- File upload interface (drag-and-drop)
- Voice input (if enabled)
- Response time indicators
Viewing Messages
Access the complete message history for analysis:View Messages
Select View Messages from the dropdown. This opens a dialog showing:
- All conversations for this chatflow
- Message timestamps
- User and AI messages
- Session IDs
- Feedback ratings (if enabled)
Message Metadata
Message Metadata
Each message includes valuable debugging data:
Debugging Techniques
Visual Flow Inspection
Use the canvas to understand data flow:- Connection Validation
- Node Validation
- Flow Validation
Ensure connections are valid:
- Green connections: Valid, type-compatible
- Red/invalid: Type mismatch or missing required input
- Orphaned nodes: Not connected to the flow (won’t execute)
- Missing inputs: Nodes with unfilled required parameters
Testing Agent Flows
Agent flows require special attention:Enable Agent Reasoning
In the chatflow configuration, enable Show Agent Reasoning to see:
- Which tools the agent considers
- Tool selection reasoning
- Tool execution results
- Intermediate steps
- Final answer synthesis
Review Tool Descriptions
Poor tool descriptions are the #1 cause of agent failures:❌ Bad: “Calculator”✅ Good: “Useful for performing mathematical calculations. Input should be a valid mathematical expression like ‘2 + 2’ or ‘10 * 5’.”
The LLM uses tool descriptions to decide when and how to call tools. Be explicit about input formats and use cases.
Test Tool Execution
Test tools individually:
- Ask questions that should trigger specific tools
- Verify tool is called with correct parameters
- Check tool returns expected results
- Confirm agent uses results appropriately
Testing RAG Flows
Retrieval Augmented Generation requires validating both retrieval and generation:Verify Document Upload
- Use the Upsert button to upload documents
- Check upsert history in settings menu
- Verify document count in vector store
- Review chunk sizes and overlap settings
Test Retrieval Quality
Ask questions and check retrieved documents:
- Enable Return Source Documents in chain config
- Review source documents in chat response
- Verify relevance (right documents retrieved?)
- Check similarity scores (above 0.7 is good)
Tune Retrieval Parameters
Adjust if retrieval is poor:
Top K: Number of documents to retrieve (default: 4)Similarity Threshold: Minimum similarity score (0.0-1.0)Chunk Size: Text splitter chunk size (500-1000)Chunk Overlap: Overlap between chunks (50-200)
Common Issues and Solutions
No Response / Timeout
No Response / Timeout
Symptoms: Chat doesn’t respond, or times out after 120 secondsCauses:
- API key invalid or quota exceeded
- Node misconfiguration (missing required params)
- Network issues or API downtime
- Infinite loop in agent
- Check browser console for errors (F12)
- Verify API credentials are valid
- Test with simpler model (e.g., gpt-3.5-turbo)
- Reduce
Max Iterationson agents - Check API status pages (status.openai.com, etc.)
Wrong or Irrelevant Answers
Wrong or Irrelevant Answers
Symptoms: LLM provides incorrect or off-topic responsesCauses:
- Poor prompt engineering
- Temperature too high (hallucinations)
- Wrong documents retrieved (RAG)
- Tool malfunction (agents)
- Review and improve system message/prompt
- Lower temperature (0.1-0.3 for factual tasks)
- Add few-shot examples in prompts
- Check retrieved documents (RAG flows)
- Verify tool descriptions (agent flows)
- Use more capable model (gpt-4 vs gpt-3.5)
Memory Not Working
Memory Not Working
Symptoms: Bot doesn’t remember previous messagesCauses:
- Memory not connected to chain/agent
- Different session IDs
- Chat history cleared
- Memory key mismatch
- Verify memory node is connected
- Check session ID consistency (should be same per user)
- Use
Session IDparameter or default to auto-generated - Ensure
Memory Keymatches chain’s expectation (chat_history) - Check memory type (Buffer vs Window vs Summary)
Tool Not Being Called
Tool Not Being Called
Symptoms: Agent ignores tools or uses wrong toolCauses:
- Vague tool description
- Model doesn’t support function calling
- System message conflicts with tool use
- Tool not connected properly
- Improve tool descriptions (be very explicit)
- Use Tool Agent instead of Conversational Agent (uses function calling)
- Remove conflicting instructions from system message
- Verify tool connections (check edge exists)
- Test with simpler prompts that clearly need the tool
Rate Limiting / 429 Errors
Rate Limiting / 429 Errors
Symptoms: “Rate limit exceeded” errorsCauses:
- Too many requests to API
- API tier limits hit
- Concurrent requests exceed quota
- Add rate limiting in chatflow configuration
- Upgrade API tier/plan
- Implement request queuing
- Use caching to reduce redundant calls
- Increase timeout between retries
Browser Developer Tools
Use browser DevTools for deeper debugging:- Console
- Network Tab
- Application Storage
Open browser console (F12) to see:
- JavaScript errors
- Network request failures
- API response details
- Validation errors
API Testing
Test your chatflow via API for production-like scenarios:Get API Endpoint
Click the API Code button in the chatflow header to see:
- Prediction endpoint URL
- Example request code (cURL, Python, JavaScript)
- API key requirements
Performance Monitoring
Response Time Analysis
Track and optimize response times:Identifying Bottlenecks
Identifying Bottlenecks
Common slow components:
- LLM API calls: 2-10 seconds (largest factor)
- Vector search: 100-500ms
- Tool execution: Varies by tool (API calls can be slow)
- Document processing: Depends on size
- Use streaming for perceived performance
- Cache frequent queries
- Use faster models (gpt-3.5-turbo vs gpt-4)
- Reduce token limits
- Optimize vector store (better indexing)
Token Usage Tracking
Monitor and control costs:Check Message Logs
View token usage in message history:
- Prompt tokens (input)
- Completion tokens (output)
- Total tokens per request
Optimize Token Usage
- Set
Max Tokensto reasonable limits - Use shorter system messages
- Reduce
Top Kin RAG (fewer retrieved docs) - Use smaller context windows
- Clear memory periodically (in long conversations)
Best Practices
Testing Workflow
Testing Workflow
- Start simple: Test basic functionality first
- Add complexity gradually: Add one node/feature at a time
- Test each addition: Verify before adding more
- Use version control: Export flows regularly as backups
- Test edge cases: Empty input, very long input, special characters
- Load test: Use API testing for production scenarios
- Monitor in production: Track errors and performance
Debugging Workflow
Debugging Workflow
- Reproduce the issue: Find consistent steps to trigger
- Isolate the problem: Remove nodes until issue disappears
- Check basics first: Credentials, connections, required params
- Read error messages: Browser console and API responses
- Test incrementally: Fix one issue at a time
- Document fixes: Add sticky notes explaining solutions
Next Steps
Variables & Expressions
Use dynamic values for advanced flows
API Reference
Integrate chatflows into your application
Deployment
Deploy and monitor in production
Best Practices
Optimization and production tips