Common Integration Pitfalls
Learn from others’ mistakes! This guide covers the most common integration errors.❌ Pitfall #1: Calling LLM Directly
The Mistake:
Why It’s Wrong:
- 🚫 QWED can’t control LLM prompting
- 🚫 No DSL enforcement
- 🚫 Vulnerable to prompt injection
- 🚫 Can’t guarantee structured output
The Fix:
❌ Pitfall #2: Trusting LLM Output Without Verification
The Mistake:
Why It’s Wrong:
- LLMs make mistakes (12% error rate in benchmarks)
- Financial errors = legal liability
- No audit trail
The Fix:
❌ Pitfall #3: Wrong Verification Method
The Mistake:
Why It’s Wrong:
- Different engines for different domains
verify()won’t analyze code security- Misses vulnerabilities
The Fix:
verify()- General (auto-detects domain)verify_math()- Mathematical expressionsverify_logic()- Logical statementsverify_code()- Code securityverify_sql()- SQL injectionverify_fact()- Fact checking
❌ Pitfall #4: Ignoring Verification Results
The Mistake:
Why It’s Wrong:
- Verification might have failed
- Using unverified data
- No error handling
The Fix:
❌ Pitfall #5: Not Handling Errors
The Mistake:
Why It’s Wrong:
- Network failures happen
- API quotas exist
- Invalid input exists
The Fix:
❌ Pitfall #6: Missing API Key Configuration
The Mistake:
Why It’s Wrong:
- Security risk (API key exposed)
- Can’t change keys without code changes
- Different keys for dev/prod
The Fix:
❌ Pitfall #7: Not Using Batch Processing
The Mistake:
Why It’s Wrong:
- Slow (sequential API calls)
- Expensive (more API credits)
- Poor user experience
The Fix:
- Individual: 100 queries × 2s = 200s
- Batch: 1 request × 5s = 5s
- 40x faster!
❌ Pitfall #8: Wrong Timeout Settings
The Mistake:
Why It’s Wrong:
- Complex queries need time
- Causes unnecessary failures
- Poor user experience
The Fix:
- Simple queries: 10-15s
- Complex queries: 30-60s
- Batch processing: 60-120s
❌ Pitfall #9: Not Running Backend Server
The Mistake:
Why It’s Wrong:
- QWED requires a backend server
- SDK is just a client that connects to backend
- Backend needs YOUR LLM API keys
The Fix:
✅ Integration Checklist
Before deploying to production, verify:- Backend server is running with your LLM API key configured
- Not calling LLM directly (QWED handles it)
- Using correct verification methods for each domain
- Checking
result.verifiedbefore using output - Proper error handling (try/except blocks)
- API key in environment variable (not hardcoded)
- Using batch processing for multiple queries
- Reasonable timeout settings
- Logging verification results for audit trails
- Testing integration (see Testing Guide)
- Monitoring QWED in production (see Monitoring)
Need Help?
Still stuck? We’re here to help:- 📖 Testing Guide - Validate your integration
- 💬 Community Support
- 📧 Enterprise Support: support@qwedai.com