Notícias
Notícias
5 min de leitura
18 de setembro de 2026

Seu agente está fazendo erros silenciosos? Formal verification é now

Bend: Formal verification pra AI (GPU-accelerated). Seu agente: está correto ou alucinando? Correctness = liability.

Equipe OpenClaw

Equipe OpenClaw · Time de Engenharia & Produto

A Equipe OpenClaw é formada por engenheiros, designers e especialistas em IA dedicados a construir a melhor plataforma de agentes conversacionais para negócios brasileiros. Combinamos expertise…


Seu agente está fazendo erros silenciosos? Formal verification é now.

Você é founder de SaaS.

Seu agente de IA:

  • Processa pedidos de clientes (suporte)
  • Calcula preços (vendas)
  • Gera relatórios (análise)
  • Your assumption: "Model é correto. Outputs são confiáveis."
  • Reality: "Model está alucinando. Erros são silenciosos."
  • Your blind spot: ├─ Agent: "Preço é R$ 500" (mas correto é R$ 350) ├─ Customer: Paga R$ 500 (ou reclama, ou perde confiança) ├─ Agent: "Sua ativação foi confirmada" (mas não foi, bug no backend) ├─ Customer: Thinks está ativado, discover later it's not ├─ Agent: "Seu saldo é R$ 1000" (mas é R$ 100, model alucinando) └─ Result: "Customer loses trust. Business loses revenue. You have liability."

Bend just solved this problem:

"Formal verification: Prove que AI logic é correto (não just probable). Usar GPU/CPU. Garantias de correctness (não best-effort)."

Translation to your SaaS:

  • Old assumption: "Trust the model (it's usually right)."
  • New reality: "Verify the logic (prove it's always right)."
  • Implication: "Your agent can have correctness guarantees (not just probabilities)."
  • Your choice: Keep flying blind or add verification.

O Problema: Agentes LLM fazem erros silenciosos que quebram confiança

Por que "usually correct" não é suficiente pra produção

=== THE CORRECTNESS CRISIS ===

Scenario: Seu agente calcula desconto pra cliente

What you expect: ├─ Customer spends R$ 1000 ├─ 10% discount = R$ 900 ├─ Agent: "Your discount: R$ 900" (correct) ├─ Customer pays R$ 900 └─ Everyone happy

What actually happens (silently): ├─ Customer spends R$ 1000 ├─ 10% discount = R$ 900 (math correct) ├─ Agent: "Your discount: R$ 1000" (HALLUCINATING) ├─ Customer sees "full refund" (but that's not what they got) ├─ Customer complaints: "I paid full price, not discount!" ├─ You investigate: "Model said discount was R$ 1000?" ├─ Realization: "Agent was wrong. Silent error. Customer angry." └─ Damage: Trust destroyed. Churn risk.

=== THE SCALE OF THE PROBLEM ===

Assume your agent makes mistakes 1% of the time (pretty good): ├─ 100 interactions: 1 mistake (maybe customer doesn't notice) ├─ 1,000 interactions: 10 mistakes (customers complaining) ├─ 10,000 interactions: 100 mistakes (reputation damage) ├─ 100,000 interactions: 1,000 mistakes (business at risk) ├─ 1,000,000 interactions: 10,000 mistakes (class action lawsuit risk) └─ Math: "At scale, 'usually correct' becomes 'frequently wrong'."

=== WHY MISTAKES ARE SILENT ===

Your agent mistakes you don't see: ├─ Customer doesn't report (they quietly leave) ├─ Mistake is subtle (R$ 350 vs R$ 500, hard to spot) ├─ You only see logs (hard to audit correctness) ├─ Model is confident (high confidence = more deceptive) ├─ No alarm (system seems to work, silently breaking) └─ Result: "You have no idea mistakes are happening."

=== THE TYPES OF MISTAKES ===

  1. Mathematical errors (calculations are wrong) ├─ Example: Discount calculation (as above) ├─ Impact: Customer pays wrong price ├─ Visibility: Customer might not notice (overpay) └─ Risk: HIGH (money is involved)

  2. Logical errors (reasoning is flawed) ├─ Example: "If customer has 3+ orders → premium member (but logic has bug)" ├─ Impact: Wrong eligibility decisions ├─ Visibility: Discovered weeks later (when customer notices) └─ Risk: HIGH (business rules violated)

  3. Hallucination errors (making stuff up) ├─ Example: "Your order ships tomorrow (but backend says next week)" ├─ Impact: Customer expectation misalignment ├─ Visibility: When order doesn't arrive when promised └─ Risk: CRITICAL (destroys trust)

  4. State errors (misunderstanding current state) ├─ Example: "Your account is verified (but it's not, status field is null)" ├─ Impact: User thinks they're ready, but system rejects them later ├─ Visibility: During critical operation (worst time) └─ Risk: CRITICAL (user frustration)

=== THE BUSINESS IMPACT ===

Per 1000 customer interactions: ├─ If 0% mistakes: Perfect trust (customers stay) ├─ If 1% mistakes: Acceptable (10 errors, some churn) ├─ If 5% mistakes: Problem (50 errors, noticeable churn) ├─ If 10%+ mistakes: Crisis (100+ errors, mass churn) └─ Your current rate: ___% (be honest)

Financial impact: ├─ 1000 customers, 10% churn from agent mistakes = 100 customers lost ├─ LTV per customer = R$ 5,000 (average) ├─ Lost LTV = R$ 500,000 (from one problem) ├─ That's a massive cost for "silent" mistakes └─ Question: "Can you afford to ignore correctness?"

=== WHY CURRENT APPROACHES FAIL ===

  1. Testing (check if outputs are correct) ├─ Problem: Can't test all scenarios (infinite combinations) ├─ Example: "Tested 100 cases, but mistake shows up in case 101" ├─ Reality: Testing catches bugs, but can't guarantee no bugs └─ Verdict: Good, but insufficient

  2. Monitoring (catch mistakes in production) ├─ Problem: Silent mistakes go undetected (customer doesn't tell you) ├─ Example: "Customer overpays, doesn't complain (just leaves)" ├─ Reality: Monitoring catches obvious failures, not subtle errors └─ Verdict: Good, but catches too late (damage already done)

  3. LLM confidence scores (trust high-confidence outputs) ├─ Problem: Model can be confident AND wrong (hallucinations) ├─ Example: "Model says 99% confident, but answer is wrong" ├─ Reality: Confidence ≠ Correctness └─ Verdict: Useless for guarantees

  4. Human review (have human check every output) ├─ Problem: Doesn't scale (humans are slow, expensive) ├─ Example: "1000 agent outputs per hour, can't review all" ├─ Reality: Human review works for 10 outputs, breaks at 100+ └─ Verdict: Good but not scalable

=== WHAT FORMAL VERIFICATION OFFERS ===

Formal verification (Bend's approach): ├─ Mathematically prove logic is correct (not just test it) ├─ Works on ALL inputs (not just tested cases) ├─ Catches bugs before they reach production ├─ GPU-accelerated (proofs run fast) ├─ Scales to complex logic (not just simple calculations) └─ Guarantee: "If proof passes, logic is 100% correct."

=== THE STRATEGIC IMPLICATION ===

For your SaaS: ├─ Option A: Trust LLM (current, risky) │ ├─ Cost: Free (already using) │ ├─ Correctness: Maybe (hope for best) │ ├─ Risk: HIGH (silent failures) │ └─ Outcome: "Works until it doesn't. Silent churn." ├─ Option B: Add formal verification (new, safe) │ ├─ Cost: Engineering effort (4-8 weeks) │ ├─ Correctness: GUARANTEED (provably correct) │ ├─ Risk: LOW (catches bugs before production) │ └─ Outcome: "Reliable. Trustworthy. Customers confident." └─ Verdict: "Option B is worth investment. Option A will cost you in churn."


Como Formal Verification muda o jogo pra agentes

De "probably correct" pra "provably correct"

=== WHAT IS FORMAL VERIFICATION? ===

Simple definition: ├─ Traditional testing: Run code with inputs, check outputs ├─ Formal verification: Mathematically prove code is correct for ALL inputs ├─ Example: "Test case: 2+2=4 ✓" vs "Proof: 2+2=4 for all integer pairs ✓" └─ Difference: Testing is finite, proofs are infinite (covers all cases)

=== HOW BEND ENABLES THIS ===

Bend is a language designed for verification: ├─ GPU/CPU backend (proofs run fast, parallelizable) ├─ Proof-writing tools (makes proofs easier to write) ├─ Automated checking (compiler verifies proofs) └─ Integration with AI (proofs constrain LLM outputs)

=== USE CASE: AGENT LOGIC VERIFICATION ===

Your agent logic (pseudocode):

if customer_age >= 18 && account_verified && balance > 0: allow_withdrawal = true else: allow_withdrawal = false

With formal verification (Bend): ├─ Write the logic in Bend ├─ Prove: "For ANY customer, if (age >= 18 AND verified AND balance > 0), withdrawal is allowed" ├─ Compiler verifies proof (takes seconds) ├─ Guarantee: "Logic is 100% correct (no edge cases)" └─ Result: "No silent failures, no business rule violations."

=== BENEFIT: CATCH BUGS BEFORE PRODUCTION ===

Before (no verification): ├─ Write agent logic ├─ Test with 100 cases (all pass) ├─ Deploy to production ├─ Week 1: Customer finds edge case (balance = 0.01, should reject but doesn't) ├─ Investigation: "Logic bug! How did we miss this?" ├─ Fix and redeploy └─ Damage: Already happened (customer exploited)

After (with Bend): ├─ Write agent logic ├─ Write proof in Bend ├─ Compiler rejects proof (logic has flaw) ├─ Fix logic (before writing proof) ├─ Proof passes (no flaw) ├─ Deploy to production └─ Result: "Bug never reached customer (caught before)."

=== THE VERIFICATION PYRAMID ===

How to think about correctness: ├─ Level 1: No testing (flying blind, very risky) ├─ Level 2: Basic testing (100 cases, catches obvious bugs) ├─ Level 3: Comprehensive testing (1000s cases, catches most bugs) ├─ Level 4: Formal verification (prove logic for all cases, catches all bugs) └─ Your level: _____ (where are you?)

=== COST-BENEFIT ANALYSIS ===

Formal verification investment: ├─ Effort: 20-40 hours per critical logic (discount calc, eligibility, etc) ├─ Cost: R$ 5K-10K per module (engineer time) ├─ Benefit: Zero bugs in that module (for 10 years) ├─ ROI: Saves 100+ hours of debugging + churn └─ Verdict: Worth it for critical logic

=== THE STRATEGIC SHIFT ===

What Bend signals: ├─ Old: "AI = probabilistic, can't guarantee correctness" ├─ New: "AI + formal verification = provably correct" ├─ Implication: "Correctness is becoming competitive advantage (not luxury)" ├─ Timeline: "Next 12 months, this becomes industry standard" └─ Your move: "Start with critical paths (discount, payment, eligibility)."


Como começar com formal verification

Step-by-step: Adicione proofs ao seu agente

=== PHASE 1: IDENTIFY CRITICAL LOGIC (1 week) ===

Step 1: List all agent decisions ├─ [ ] What decisions does your agent make? ├─ [ ] Which involve money? (payment, discount, pricing) ├─ [ ] Which are business rules? (eligibility, access, feature flags) ├─ [ ] Which cause customer impact if wrong? (all of above) └─ Output: List of 5-10 critical paths

Step 2: Prioritize by risk ├─ [ ] What's the cost of error? (per mistake × frequency) ├─ [ ] Example: Discount calc (1% error × 10K interactions = R$ 50K impact) ├─ [ ] Example: Eligibility (5% error × 1K customers = R$ 100K churn) ├─ [ ] Rank by risk (highest first) └─ Output: Top 3 paths to verify first

Step 3: Document current logic ├─ [ ] How does agent decide on this path? ├─ [ ] What inputs? ├─ [ ] What outputs? ├─ [ ] What rules/constraints? ├─ [ ] Any edge cases known? └─ Output: Documented logic (clear, unambiguous)

=== PHASE 2: LEARN FORMAL VERIFICATION (2 weeks) ===

Step 1: Learn Bend basics ├─ [ ] Read Bend docs (https://bend-lang.com/) ├─ [ ] Understand syntax (simple language, designed for verification) ├─ [ ] Learn how to write proofs (not as hard as you think) ├─ [ ] Work through examples (Bend provides tutorials) └─ Effort: ~20 hours

Step 2: Practice on simple logic ├─ [ ] Write simple logic in Bend ("if age > 18, adult = true") ├─ [ ] Write proof ("for all ages >= 18, adult is true") ├─ [ ] Run compiler (check proof works) ├─ [ ] Experiment (try edge cases, see proofs catch them) └─ Effort: ~10 hours

Step 3: Understand limitations ├─ [ ] Formal verification can't verify LLM outputs (only deterministic logic) ├─ [ ] But can verify how agent USES LLM outputs (logic is deterministic) ├─ [ ] Example: Can't verify "model recommendation is good", but can verify "if recommendation is X, do Y" └─ Understanding: Verification constrains agent logic, not model

=== PHASE 3: IMPLEMENT ON FIRST PATH (4 weeks) ===

Step 1: Rewrite logic in Bend ├─ [ ] Take critical path (e.g., discount calculation) ├─ [ ] Rewrite logic in Bend (simple language, designed for this) ├─ [ ] Test that outputs match original (sanity check) └─ Effort: ~10 hours

Step 2: Write formal proofs ├─ [ ] Define what correctness means ("discount is always between 0-50%") ├─ [ ] Write proof in Bend (using proof language) ├─ [ ] Compiler checks proof (automated, takes seconds) ├─ [ ] Fix logic if proof fails (means there was bug) └─ Effort: ~10 hours

Step 3: Integrate into agent ├─ [ ] Deploy Bend logic alongside agent ├─ [ ] Agent calls Bend logic for calculation (verified result) ├─ [ ] Agent uses verified result (guaranteed correct) ├─ [ ] Monitor: Are results matching expectations? (should be perfect) └─ Effort: ~5 hours

=== PHASE 4: SCALE TO ALL CRITICAL PATHS (ongoing) ===

Step 1: Repeat for each critical path ├─ [ ] Discount calculation (verified ✓) ├─ [ ] Eligibility check (next) ├─ [ ] Payment processing (next) ├─ [ ] Feature access (next) ├─ [ ] Reporting logic (next) └─ Timeline: 1-2 paths per month

Step 2: Monitor verification impact ├─ [ ] Are errors decreasing? (measure before/after) ├─ [ ] Customer complaints about logic? (should go to zero) ├─ [ ] Confidence in agent outputs? (should increase) └─ Metric: Track "logic-related bugs" over time (should trend to zero)

Step 3: Build organizational capability ├─ [ ] Train team on Bend (certification, knowledge sharing) ├─ [ ] Create internal guidelines (when to use verification) ├─ [ ] Build library of proven logic (reusable components) ├─ [ ] Make verification part of your agent development process └─ Result: "Verification becomes standard, not optional."

=== IMPLEMENTATION CHECKLIST ===

[ ] Week 1-2: Learning ├─ [ ] Identify critical logic ├─ [ ] Prioritize by risk ├─ [ ] Document current implementation └─ [ ] Learn Bend basics

[ ] Week 3-6: First path ├─ [ ] Rewrite logic in Bend ├─ [ ] Write formal proofs ├─ [ ] Test integration └─ [ ] Deploy to production

[ ] Week 7+: Scale ├─ [ ] Repeat for next path ├─ [ ] Monitor correctness metrics ├─ [ ] Build team capability └─ [ ] Make verification standard

=== EXPECTED OUTCOME ===

After implementing formal verification on critical paths: ├─ Bugs in verified logic: 0% (vs 1-5% before) ├─ Correctness confidence: 100% (vs "hope for best") ├─ Customer trust: Significantly improved (no silent failures) ├─ Support tickets from logic bugs: 90% reduction ├─ Competitive advantage: Few competitors have this └─ Business impact: Churn reduction, customer satisfaction increase


Checklist: Seu agente tem garantias de correctness?

Avalie seu current correctness posture

=== CORRECTNESS ASSESSMENT ===

[ ] Current approach ├─ [ ] Do you test agent logic? (if no: start immediately) ├─ [ ] How many test cases? (<100: low, >1000: good) ├─ [ ] Do you monitor for logic bugs in production? (if no: blind) ├─ [ ] Have you found logic bugs? (if no: either lucky or not looking) ├─ [ ] Can you prove logic is correct? (if no: no guarantees) └─ [ ] Verdict: Safe or risky?

[ ] Risk assessment ├─ [ ] Decisions involving money? (discount, pricing, payment) ├─ [ ] Business rule enforcement? (eligibility, access, feature gates) ├─ [ ] Customer-facing logic? (what customers see, can impact trust) ├─ [ ] Scale (how many interactions per day?) └─ [ ] Risk level: Low (no money) vs High (money involved)

[ ] Impact if wrong ├─ [ ] Financial loss per mistake? (R$ value) ├─ [ ] Customer trust impact? (churn risk) ├─ [ ] Regulatory/compliance risk? (any violations?) ├─ [ ] Can you afford to ignore correctness? (be honest) └─ [ ] Verdict: Critical or nice-to-have?

[ ] Current visibility ├─ [ ] Can you detect when agent logic is wrong? (monitoring) ├─ [ ] How long to detect? (seconds, hours, days?) ├─ [ ] Can you prevent wrong logic from reaching customers? (safeguards) ├─ [ ] Are silent errors possible? (customer doesn't report, just leaves) └─ [ ] Verdict: Visible or hidden?

=== SCORING ===

Critical logic + high risk + low visibility = URGENT ├─ Action: Implement formal verification NOW (priority #1)

Critical logic + high risk + good visibility = HIGH PRIORITY ├─ Action: Implement formal verification THIS QUARTER

Critical logic + medium risk + any visibility = MEDIUM PRIORITY ├─ Action: Implement formal verification THIS YEAR

Non-critical logic = LOWER PRIORITY ├─ Action: Monitor, optimize, but not urgent for verification

=== DECISION ===

If CRITICAL: └─ START IMMEDIATELY (correctness is business necessity)

If HIGH PRIORITY: └─ START THIS MONTH (competitive advantage window)

If MEDIUM PRIORITY: └─ PLAN FOR THIS QUARTER (preparation phase)

If LOWER PRIORITY: └─ MONITOR FOR NOW (but expect formal verification to become standard)


Conclusão: De "usually correct" pra "provably correct"

O que Bend provou sobre AI correctness:

  1. LLM outputs são probabilistic ("usually correct", não always)

    • Antes: "Model é confident, must be right"
    • Depois: "Confidence ≠ Correctness (can hallucinate confidently)"
    • Implicação: "Você precisa de proofs, não just confidence scores."
  2. Silent failures são common (customers leave without complaining)

    • Antes: "If no complaints, everything is fine"
    • Depois: "Customers disappear silently (not reporting mistakes)"
    • Implicação: "Correctness issues are invisible unless you look for them."
  3. Formal verification is now practical (Bend made it accessible)

    • Antes: "Formal verification é research (too complex)"
    • Depois: "Formal verification é tooling (GPU-accelerated, practical)"
    • Implicação: "You can now afford to add correctness guarantees."
  4. Business logic needs proofs (not just testing)

    • Antes: "Testing is enough"
    • Depois: "Testing catches 90%, proofs catch 100%"
    • Implicação: "Critical logic should be formally verified."
  5. Correctness is competitive advantage (differentiation from naive agents)

    • Antes: "Everyone trusts their models"
    • Depois: "Winners verify, losers guess"
    • Implicação: "Formal verification becomes table stakes (next 12 months)."

Sua decisão hoje:

  • Ignore (hope you don't have logic bugs)
  • Evaluate (check what could go wrong)
  • Implement (add formal verification to critical paths)

Recomendação: Audit seu agente HOJE. Se tem logic involving money/business rules, implement Bend verification THIS QUARTER. Silent failures are costly.

Na OpenClaw:

Ajudamos SaaS builders adicionar formal verification:

  • Correctness assessment: Seu agente tem garantias? (audit)
  • Critical path identification: Qual logic precisa verification? (analysis)
  • Bend implementation: Como integrar formal proofs? (engineering)
  • Testing strategy: Como validar proofs funcionam? (validation)
  • Monitoring setup: Como detectar correctness violations? (observability)
  • Incident response: Se proof falhar em produção, como recuperar? (reliability)
  • Scaling verification: Como escalar proofs to complex logic? (architecture)

Your agents can either make silent mistakes (now) or guarantee correctness (with Bend).

Choice: Probabilistic guesses or mathematical certainty?

Formal Verification Strategy | Bend Implementation | Provable Correctness →


Publicado em 18 de setembro de 2026

Leia também