β Pitfall #1: calling the 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 the 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