Skip to main content
TL;DR: Verification is a critical task requiring maximum accuracy. Cloud LLMs (GPT-4, Claude) deliver 90-95% accuracy vs 70-80% for local models, making them ideal for production verification.

🎯 The core problem

Verification requires two things:
  1. LLM translates the query (natural language → structured reasoning)
  2. Symbolic verifier proves the answer (SymPy, Z3, AST)
If the LLM gets step 1 wrong, verification fails even with perfect symbolic math.

📊 LLM accuracy comparison

Math verification example

Query: “What is the integral of 2x?”

Why this matters

When QWED verifies:
If LLM is wrong:
Result: User sees failure, even though QWED’s symbolic engine is correct!

🤔 When to use each


💡 QWED’s hybrid approach

Best Practice: Use both strategically

Development setup (free)

Cost: $0/month
Use for: Prototyping, experimentation, learning

Production setup (reliable)

Cost: ~$5-10/month (with caching!)
Use for: Production, high-stakes decisions

💰 Cost analysis

Local LLM (Ollama)

  • Setup: 10 minutes (download model)
  • Monthly Cost: $0
  • Accuracy: 70-80% on math/logic
  • Privacy: 100% local
  • Best for: Development, testing, learning

Cloud LLM (OpenAI GPT-4o-mini)

  • Setup: 2 minutes (API key)
  • Monthly Cost: $5-10 (with caching)
  • Accuracy: 90-95% on math/logic
  • Privacy: Use PII masking
  • Best for: Production, critical tasks

With QWED caching (cost savings)

Savings: repeated queries hit the cache and skip the LLM call.

🔒 Privacy considerations

Local LLM advantages

Private — data stays on your machine
No API keys - no third-party access
Compliance - easier GDPR/HIPAA compliance

Cloud LLM with PII masking

Result: Cloud accuracy + local privacy! 🔒

🎯 Recommendation by use case

Healthcare (HIPAA)

Recommendation: Cloud + PII masking for critical diagnoses

Finance (PCI-DSS)

Recommendation: Cloud + PII masking (accuracy matters for money!)

Enterprise (general)

Recommendation: Hybrid approach

🚀 The QWED advantage

Even with local LLMs, QWED catches errors!

Scenario: local LLM makes mistake

User sees: “Verification failed - LLM answer doesn’t match symbolic proof” But:
  • More failures = worse UX
  • Cloud LLMs = fewer verification failures = better UX

📈 Accuracy in practice

From QWED internal testing: Takeaway: Cloud LLMs reduce verification failures by 15-25%!

🎓 Bottom line

Start with local LLM

Perfect for: Learning, prototyping, hobby projects

Scale to cloud LLM

Perfect for: Production, enterprise, critical decisions

❓ FAQ

Q: Can I use Llama 3 70B instead of GPT-4?
A: Yes! Larger local models (70B+) approach cloud accuracy but require significant hardware (40GB+ VRAM).
Q: Is Ollama really free?
A: Yes! Fully open source. You just need hardware to run it.
Q: What about Google Gemini?
A: QWED supports Gemini! Similar accuracy to GPT-4/Claude.
Q: Can I switch between local and cloud?
A: Absolutely! Change the provider parameter anytime.
Q: Do I need PII masking with local LLMs?
A: Not necessarily, but it’s still good practice for audit trails.

The choice is yours - QWED works with both! 🚀 Recommendation: Start local (free), scale to cloud (reliable) when it matters.