| sidebar_position | 10 |
|---|---|
| title | Frequently asked questions |
| description | Get answers to common questions about QWED verification. Learn how it differs from RAG, fine-tuning, and guardrails for deterministic LLM output validation. |
QWED is a deterministic verification protocol for Large Language Models (LLMs). It treats LLMs as "untrusted translators" and verifies their outputs using formal methods (SymPy, Z3, AST, SQLGlot).
| Feature | QWED | RAG | Fine-tuning | Guardrails |
|---|---|---|---|---|
| Deterministic | ✅ Yes | ❌ No | ❌ No | ❌ No |
| Mathematically proven | ✅ Yes | ❌ No | ❌ No | |
| No training required | ✅ Yes | ❌ No | ✅ Yes | |
| Works offline | ❌ API-based | ✅ Yes | ✅ Yes | ✅ Yes |
QWED complements these tools — use RAG for knowledge, QWED for verification.
No. Once initialized, QWED reads your provider credentials and configuration from the .env file that qwed init creates. You only need to re-run it when you want to switch LLM providers or rotate API keys. Running qwed init again merges new values into your existing .env — it does not overwrite settings you don't change.
Yes. QWED requires a backend server with your LLM API keys configured.
Architecture:
Your app → SDK → Backend server (you run) → LLM (your key) → Verifiers
Setup:
# Step 1: Configure your LLM
cp .env.example .env
echo "ANTHROPIC_API_KEY=sk-ant-..." >> .env
# Step 2: Run backend
python -m qwed_api
# Step 3: Use SDK
python your_app.pySee Getting started for full setup.
No. This is a common mistake.
❌ Wrong:
llm_result = openai.chat(...) # Don't do this
qwed.verify(llm_result) # Too late✅ Correct:
# Let QWED backend handle LLM call
result = qwed.verify("your question")The backend server (that you run) calls the LLM using your API key.
You configure your LLM provider in the backend's .env file:
Supported providers:
- OpenAI (direct API)
- Anthropic Claude
- Azure OpenAI
- AWS Bedrock
- Google Gemini
Example .env:
ACTIVE_PROVIDER=anthropic
ANTHROPIC_API_KEY=sk-ant-...See LLM configuration for all providers.
Yes. You must use your own LLM API key. QWED is open source — you run the backend server with your credentials.
You provide:
- Your own LLM API key (in
.env) - Your own backend server (run locally)
You control:
- Which LLM provider to use
- All your data and keys
Open source: free.
- You pay only for your own LLM API usage
- No QWED subscription needed
- Run backend server yourself
Costs you pay:
- Your LLM provider (OpenAI, Anthropic, etc)
- Your hosting (if deploying backend)
Example: If using Anthropic Claude:
- Input: $3 per million tokens
- Output: $15 per million tokens
- (See your LLM provider's pricing)
QWED itself: no rate limits. It's open source.
Your LLM provider: Check their limits:
- OpenAI: Tier-based (see dashboard)
- Anthropic: Based on plan
- Azure: Based on deployment
If you hit your LLM provider's rate limit, implement retries:
import time
try:
result = qwed.verify(query)
except Exception as e:
if "rate_limit" in str(e):
time.sleep(60) # Wait and retry
result = qwed.verify(query)Yes. QWED:
- Uses encrypted connections (HTTPS/TLS)
- Doesn't store verification queries by default
- SOC 2 Type II compliant (Enterprise plan)
- Supports on-premise deployment (Enterprise Pro+)
No. QWED only sees:
- The query you send
- SQL schema (if verifying SQL)
- Code snippet (if verifying code)
It cannot access your application database or files.
Default: 30 days for audit logs
Enterprise: Configurable (90 days - 7 years)
On-premise: You control retention
Average response times:
- Simple queries: 1-2 seconds
- Complex queries: 2-5 seconds
- Batch processing: 0.5s per item
Factors affecting speed:
- Query complexity
- Network latency
- Verification engine used
Yes:
-
Use batch processing:
results = qwed.verify_batch(items) # Faster than individual calls
-
Cache results:
@cache def cached_verify(query): return qwed.verify(query)
-
Use async:
results = await qwed.verify_async(queries)
Supported domains:
- Math - Calculations, equations, algebra
- Logic - Propositional logic, SAT/UNSAT
- Code - Security vulnerabilities, syntax
- SQL - Injection attacks, tautologies
- Facts - Multi-source consensus
- Stats - Statistical claims
- Images - Visual verification
- Consensus - Multi-model agreement
Not supported:
- Creative writing quality
- Subjective opinions
- Future predictions
- Unstructured text summaries
Use cases: QWED is for objective, verifiable claims only.
Common causes:
-
Malformed input:
# ❌ Too vague result = qwed.verify("calculate something") # ✅ Specific result = qwed.verify("Calculate 15% of 200")
-
Wrong verification method:
# ❌ Wrong result = qwed.verify(code_snippet) # ✅ Correct result = qwed.verify_code(code_snippet, language="python")
-
Network issues:
result = qwed.verify(query, timeout=60) # Increase timeout
Enable verbose mode:
client = QWEDClient(api_key="...", verbose=True)
result = client.verify("2+2=4")
# Prints internal flow to consoleCheck trace:
result = client.verify("2+2=4", return_trace=True)
print(result.trace)
# Shows LLM extraction → verification stepsYes. QWED is used in production by:
- Financial institutions (loan calculations)
- Healthcare AI (drug interaction checking)
- Legal tech (contract analysis)
- EdTech (student assessment)
See Production deployment guide for full checklist.
Quick steps:
- Test thoroughly in staging
- Deploy with feature flag
- Start with 5% traffic (canary)
- Monitor metrics
- Gradually increase to 100%
Recommended:
- Implement fallback mechanism
- Cache recent results
- Graceful degradation
try:
result = qwed.verify(query, timeout=5)
except QWEDError:
# Fallback to cached/approximate result
logger.warning("QWED unavailable, using fallback")
return fallback_result()Community (free):
Enterprise support:
- 📧 Email: support@qwedai.com
- 💼 Slack Connect (Enterprise customers)
- 📞 Emergency Hotline (Enterprise Pro+)
Response times:
- Community: Best effort
- Pro: 24-48 hours
- Enterprise: 4-hour SLA
- Enterprise Pro+: 1-hour SLA
Yes. Submit feature requests:
Most requested features:
- Real-time streaming verification (Q2 2026)
- Client-side verification (Q3 2026)
- More language SDKs (ongoing)
- 📖 Full documentation
- 💬 Community forum
- 📧 Contact: support@qwedai.com