Notícias
Notícias
5 min de leitura
14 de outubro de 2026

Seu agente gera código bloated? (Parsimony revelou)

Parsimony: AI models geram 2-3x mais código do que necessário. Seu agente? Bloated. Como otimizar prompts (custo, qualidade, speed).

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 gera código bloated? (Parsimony revelou)

Notícia: Pesquisador lançou Parsimony (benchmark open-source que mede EXCESSO DE CÓDIGO gerado por AI models). O quê descobriu: Benchmarks tradicionais medem "solve rate" (conseguiu resolver?) e "cost" (quanto custou em tokens). Problem: NÃO medem QUALIDADE do código (quanto codigo é desnecessário? Bloat quantifies?). Resultado: Parsimony mostrou: AI models geram 2-3x MAIS código do que necessário (desnecessário).

Implicação: Se AI models geram code bloated em benchmarks = seu agente WhatsApp (gerando respostas) provavelmente TAMBÉM gera bloat (muito texto, muitos tokens, desnecessário). Realidade: Seu agente custa $10k/mês? Provavelmente $5k é WASTE (tokens inúteis). Urgência: Parsimony mostrou = agora você SABE que ai models tão gerando excess (antes era invisível). Hora de otimizar.

Realidade: **

THE PROBLEM (YOUR AGENT IS BLOATED):

WHAT PARSIMONY REVEALED:

Traditional benchmarks: ├─ Metric 1: Solve rate (did model solve the problem?) │ ├─ Example: "Can it fix this bug?" → Yes/No │ ├─ Problem: Doesn't measure HOW MUCH code generated │ └─ Result: Model that solves problem with 10x excess code still passes │ ├─ Metric 2: Token cost (how much did it cost?) │ ├─ Example: "Cost: 1000 tokens" │ ├─ Problem: Doesn't measure if tokens are NECESSARY │ └─ Result: Model that uses 10x unnecessary tokens still seems reasonable │ └─ Missing metric: CODE QUALITY (is code bloated?) ├─ What: How many coding units (statements, calls, names, literals)? ├─ Problem: Traditional benchmarks ignored this └─ Result: Models rewarded for excess code (longer = seems more thorough)

Parsimony's discovery: ├─ What: Measure "coding units" per solution ├─ Method: Count syntax elements (statements, function calls, variable names) ├─ Key: Not lines of code (can be cramped) │ ├─ Bad metric: x=1;y=2;z=3 (3 statements, 1 line) │ ├─ Good metric: coding units = 3 (captures actual complexity) │ └─ Result: More honest measurement │ ├─ Result: AI models generate WAY more code than necessary │ ├─ Model A: Solves problem with 100 coding units (lean) │ ├─ Model B: Solves same problem with 300 coding units (bloated) │ ├─ Traditional bench: Both pass (both solved it) │ ├─ Parsimony bench: Model A wins (70% fewer units) │ └─ Implication: Model B is wasteful (but nobody knew before) │ └─ Scale: Across all benchmarks, excess code = 50-200% MORE than needed ├─ Median excess: 50-100% ├─ Worst case: 200%+ excess ├─ Implication: Your AI is using 2-3x more tokens than necessary └─ Cost: If you pay $10k/month, $5k is WASTE

WHY THIS MATTERS FOR YOUR AGENT:

Your agent generates text responses (not code, but same principle): ├─ Traditional metric: "Did agent answer the question?" │ ├─ Agent output 1: "Yes, you should buy because it's good" │ ├─ Agent output 2: "You should consider buying because: (1) it has feature X which allows you to do Y, (2) it integrates with Z, (3) it's price point is competitive for the market segment" │ ├─ Traditional metric: Both pass (both answered question) │ ├─ Problem: Doesn't measure output quality │ └─ Result: Model B gets more tokens (longer = more thorough?) but might be bloated │ ├─ Cost impact: │ ├─ Agent response: 1000 tokens average (OpenAI GPT-4) │ ├─ Cost: $0.03 per response (output tokens expensive) │ ├─ Daily volume: 10k conversations │ ├─ Daily cost: $300/day = $9k/month │ ├─ If bloated 50%: Could be $150/day = $4.5k/month │ ├─ Savings: $4.5k/month by removing bloat │ └─ Annual: $54k saved │ ├─ Speed impact: │ ├─ Bloated response: 1000 tokens │ ├─ Lean response: 500 tokens │ ├─ Time to generate: 1000 tokens = 3-5 seconds (feels slow) │ ├─ Time to generate: 500 tokens = 1-2 seconds (feels fast) │ ├─ Customer experience: Fast responses = happier (faster close) │ └─ Implication: Lean outputs = better UX │ ├─ Quality impact: │ ├─ Bloated: Too much information (customer confused) │ ├─ Lean: Right amount (customer gets answer, decides fast) │ ├─ Example: Sales agent │ │ ├─ Bloated: "Here's 10 features of our product..." (overwhelming) │ │ ├─ Lean: "This product solves your specific problem" (focused) │ │ └─ Conversion: Lean > Bloated (clear beats overwhelming) │ │ │ └─ Result: Optimization improves BOTH cost and quality │ └─ Your baseline: Probably 50-100% bloated (like AI models in Parsimony) ├─ Assumption: Most agents not optimized ├─ Implication: Huge opportunity to improve └─ Action: Optimize now (competitors will catch up)

HOW TO MEASURE BLOAT (LEAN LIKE PARSIMONY):

Method 1: Token ratio (simplest) ├─ Measure: Output tokens vs expected tokens ├─ Example: │ ├─ Question: "Which product should I buy?" │ ├─ Ideal answer length: 50-100 tokens │ ├─ Your agent output: 500 tokens │ ├─ Bloat ratio: 500/100 = 5x excess │ └─ Result: Severely bloated │ ├─ Calculate: │ ├─ For each conversation type (sales, support, etc) │ ├─ Estimate ideal token count (based on question) │ ├─ Measure actual token count (from API logs) │ ├─ Calculate ratio: actual / ideal │ └─ Target: <1.5x ideal (50% overhead acceptable) │ └─ Action: Run on 100 random conversations (understand baseline)

Method 2: Customer feedback (qualitative) ├─ Ask customers: │ ├─ "Was the response too long?" │ ├─ "Did you find the answer quickly?" │ ├─ "Was there too much information?" │ └─ Result: %age saying "too long" = bloat indicator │ ├─ Interpretation: │ ├─ >30% saying "too long" = severely bloated │ ├─ 10-30% = moderately bloated │ ├─ <10% = well-optimized │ └─ Action: If >30%, optimize prompts immediately │ └─ Cost: Free (existing feedback channels)

Method 3: Conversion rate by response length (advanced) ├─ Hypothesis: Lean responses = higher conversion (sales) ├─ Measure: Segment conversations by response length │ ├─ Short responses: <100 tokens → conversion rate │ ├─ Medium responses: 100-300 tokens → conversion rate │ ├─ Long responses: >300 tokens → conversion rate │ └─ Correlation: If short > medium > long = bloat kills conversion │ ├─ Example: │ ├─ Short responses: 25% conversion rate │ ├─ Medium: 20% conversion │ ├─ Long: 15% conversion │ ├─ Implication: Long responses lose 40% of conversions │ ├─ If 10k conversations/month, $10 per conversion │ ├─ Loss: 1000 conversions × $10 = $10k/month revenue lost │ └─ Action: Fix bloat = gain $10k/month revenue │ └─ Insight: Bloat costs BOTH in API spend AND in lost conversions

HOW TO FIX BLOAT (OPTIMIZE YOUR AGENT):

Fix 1: Rewrite prompts (lean instructions) ├─ Before (bloated): │ ├─ "You are a helpful sales assistant. Your goal is to help customers find the right product. Please consider their needs, budget, timeline, and preferences. Provide a detailed analysis of each option, including pros and cons, pricing, and integration options. Be thorough and helpful." │ ├─ Problem: "detailed", "thorough", "helpful" reward long outputs │ └─ Token cost: Probably 50-100 tokens JUST for instruction │ ├─ After (lean): │ ├─ "Help customer choose the right product. Be concise. Focus on their specific need. One paragraph max." │ ├─ Benefit: Clear constraint (one paragraph) │ └─ Token cost: 20 tokens instruction │ ├─ Example in action: │ ├─ Bloated prompt → bloated output (200 tokens) │ ├─ Lean prompt → lean output (80 tokens) │ ├─ Savings per response: 120 tokens = $0.004 │ ├─ Scale: 10k responses/month = $40/month saved │ └─ Annual: $480 saved (and faster responses + better UX) │ └─ Implementation: Update prompt, test, measure improvement

Fix 2: Add output constraints (hard limits) ├─ Method 1: Token limit in prompt │ ├─ Prompt: "Answer in <100 tokens" │ ├─ Benefit: Clear constraint │ ├─ Limitation: Model might cut off mid-sentence │ └─ Use when: You can afford incomplete answers │ ├─ Method 2: Character limit │ ├─ Prompt: "Answer in <500 characters" │ ├─ Benefit: More predictable (character = more human-understandable) │ └─ Use when: Character limit natural for context │ ├─ Method 3: Format constraint │ ├─ Prompt: "Respond with 1-sentence recommendation only" │ ├─ Benefit: Forces focus (1 sentence = lean by definition) │ ├─ Example outputs: │ │ ├─ Bloated without constraint: "Product A is good because X, Y, Z, and also..." │ │ ├─ Lean with constraint: "Product A best fits your needs." │ │ └─ Difference: 50 tokens vs 10 tokens │ │ │ └─ Use when: You want decisive output │ └─ Testing: Run same prompts on multiple models (see which constraint works best)

Fix 3: Few-shot examples (show, don't tell) ├─ Problem: Telling model "be concise" doesn't work ├─ Solution: Show examples of concise outputs ├─ Example: │ ├─ Prompt: "Help customer choose product (be like examples below)" │ ├─ Example 1: Q: "Which product?" → A: "Product A. Best for your budget." │ ├─ Example 2: Q: "Tell me more" → A: "Feature X solves your issue. Compare with Product B here." │ ├─ Result: Model learns by example (more effective than instruction) │ └─ Benefit: Outputs lean + high quality │ └─ Implementation: Add 2-3 examples to prompt (costs ~50 tokens, saves 100+ in output)

Fix 4: Response templates (structure output) ├─ Instead of: Free-form response (bloated, rambling) ├─ Use template: │
│ RECOMMENDATION: [1 sentence] │ WHY: [2 sentences] │ NEXT STEP: [1 sentence] │
├─ Benefit: Forces structure (can't ramble) ├─ Token savings: 150 tokens → 60 tokens (60% reduction) ├─ Example: │ ├─ Bloated (free-form): "Based on your needs for a fast solution at low cost, I recommend Product A. It has several features that might interest you, including automation, integrations, and good support. You might also want to consider Product B, but it's more expensive. Product A is probably the best choice..." │ ├─ Lean (template): "RECOMMENDATION: Product A. WHY: Fast + affordable. Solves your problem. NEXT STEP: Start free trial." │ └─ Difference: 120 tokens vs 30 tokens (75% reduction) │ └─ Implementation: Define template, add to prompt, test

Fix 5: Model selection (some models are leaner) ├─ Research: │ ├─ GPT-4 Turbo: Can be verbose (high token count) │ ├─ GPT-3.5: Often more concise (lower token count) │ ├─ Claude 3 Opus: High quality but verbose │ ├─ Claude 3 Sonnet: Balanced (quality + conciseness) │ └─ Claude 3 Haiku: Very concise (good for constrained output) │ ├─ Test: Run same prompt on 3 models, compare token counts │ ├─ Model A: 200 tokens │ ├─ Model B: 150 tokens (25% savings) │ ├─ Model C: 100 tokens (50% savings) │ └─ Action: Switch to Model C if quality acceptable │ ├─ Caveat: Leaner model ≠ better quality (test thoroughly) └─ ROI: If Model C is $2x cheaper + fewer tokens, savings are huge

IMPLEMENTATION ROADMAP:

Week 1: Measure bloat ├─ Step 1: Pull last 1000 conversations ├─ Step 2: Calculate average tokens per response ├─ Step 3: Estimate ideal tokens (based on question type) ├─ Step 4: Calculate bloat ratio (actual / ideal) ├─ Deadline: Friday └─ Output: Know your bloat baseline

Week 2: Test lean prompts ├─ Step 1: Rewrite prompts (2-3 variations) │ ├─ Variation A: Original (bloated) │ ├─ Variation B: With output constraint ("<100 tokens") │ ├─ Variation C: With few-shot examples │ └─ Variation D: With template │ ├─ Step 2: Run test (100 conversations per variation) ├─ Step 3: Measure: │ ├─ Token count per response │ ├─ Quality (human review, customer satisfaction) │ ├─ Cost (tokens × price) │ └─ Speed (time to generate) │ ├─ Step 4: Compare (which variation wins?) ├─ Deadline: End of week 2 └─ Output: Know which optimization technique works best

Week 3: Deploy winning variation ├─ Step 1: Update production prompts (winning variation) ├─ Step 2: Monitor metrics (tokens, quality, speed) ├─ Step 3: Gradual rollout (10% → 50% → 100% traffic) ├─ Step 4: Alert if quality drops (revert if needed) ├─ Deadline: End of week 3 └─ Output: Optimized agent live

Week 4+: Measure ROI ├─ Baseline: Month 1 before optimization ├─ Current: Month 2 after optimization ├─ Calculate: │ ├─ API cost savings: (baseline - current) │ ├─ Revenue impact: Conversion rate changes │ ├─ Customer satisfaction: NPS, feedback │ └─ Speed improvement: Response time changes │ ├─ Example ROI: │ ├─ API savings: $300/month (30% reduction) │ ├─ Revenue gain: +$500/month (conversion up 2%) │ ├─ Engineering cost: $2000 (one week) │ ├─ Payback period: $2000 / ($300+$500) = 2.5 months │ └─ Year 1 value: ($300+$500) × 10 months = $8k (after payback) │ └─ Next: Expand to other use cases (repeat process)

METRICS (WHAT TO TRACK):

Metric 1: Average tokens per response ├─ Target: Reduce by 30-50% (through optimization) ├─ Baseline: Measure today ├─ Goal: 30% reduction = $90/month savings (if current $300/month) └─ Tracking: Weekly dashboard

Metric 2: Cost per conversation ├─ Calculate: Total API cost / total conversations ├─ Baseline: $0.30 per conversation (example) ├─ Goal: $0.20 per conversation (-33%) └─ Tracking: Weekly P&L

Metric 3: Customer satisfaction (bloat indicator) ├─ Measure: "Was response too long?" (yes/no) ├─ Target: <10% saying "too long" ├─ Baseline: Probably 30-50% (if bloated) └─ Tracking: Survey after each conversation

Metric 4: Conversion rate by response length ├─ Segment: Short vs medium vs long responses ├─ Measure: Conversion rate for each segment ├─ Goal: All segments >20% (no cliff for long responses) └─ Tracking: Monthly cohort analysis

Metric 5: Response generation time ├─ Measure: Time from request to full response ├─ Baseline: 3-5 seconds (bloated = slower) ├─ Goal: <2 seconds (lean = faster) └─ Tracking: API response time logs

BOTTOM LINE:

Parsimony discovery: AI models bloated (2-3x excess code). Your agent: Probably same (bloated text, excess tokens). Cost: If $10k/month API, maybe $3-5k is waste. Action: Optimize prompts (constraint + examples + templates). Timeline: 3-4 weeks to deploy. ROI: $300-500/month savings + better customer experience. When: START NOW (competitors will optimize soon).


Conclusão: Parsimony uncovered the truth (time to optimize)

Fatos:

✗ Traditional benchmarks: Measure solve rate (ignores bloat) ✗ Parsimony revealed: AI models bloated (50-200% excess) ✗ Your agent: Probably same (bloated responses, waste tokens) ✗ Cost: If $10k/month, maybe $3-5k is waste ✓ Solution: Optimize prompts (constraints, examples, templates) ✓ Timeline: 3-4 weeks ✓ ROI: $300-500/month savings + better UX ✓ When: NOW (before competitors catch up)

WHY THIS MATTERS:

Because bloat is invisible: ├─ You don't see it (just pay monthly bill) ├─ Customers experience it (slow, overwhelming) ├─ Parsimony made it visible (now you know) └─ Action: Fix it (before competitors do)

Because optimization = win-win: ├─ Costs: Down 30-50% (less API spend) ├─ Speed: Up 50-70% (faster responses = better UX) ├─ Quality: Up (lean = focused = better decisions) ├─ Customer satisfaction: Up (concise beats verbose) └─ Revenue: Up (better UX = higher conversion)

Because competitors will optimize: ├─ First-movers: Early optimization = cost advantage ├─ Price war: Leaner = cheaper = undercut competitors ├─ Window: 2-4 months before market catches up └─ Action: Optimize now (before forced by competition)

WHAT YOU MUST DO (THIS WEEK):

Action 1: Measure bloat (understand problem) ├─ Pull: Last 1000 conversations ├─ Calculate: Average tokens per response ├─ Estimate: Ideal tokens (50% of current = target) ├─ Result: Bloat ratio (actual / ideal) ├─ Deadline: This Friday └─ Output: Know your baseline

Action 2: Test lean prompts (find winning variation) ├─ Create: 4 prompt variations │ ├─ V1: Current (baseline) │ ├─ V2: With output constraint ("<100 tokens") │ ├─ V3: With few-shot examples │ ├─ V4: With template format │ ├─ Test: 100 conversations per variation ├─ Measure: Tokens, quality, cost, speed ├─ Compare: Which wins? (fewest tokens + best quality) ├─ Deadline: End of week 2 └─ Output: Winning prompt

Next 2 weeks: ├─ Deploy: Switch production to winning prompt ├─ Monitor: Track metrics (watch for quality drops) ├─ Gradual: 10% → 50% → 100% traffic ├─ Measure: ROI after 1 month └─ Result: 30-50% cost reduction + better UX

Expected outcome (month 1): ├─ API costs: Down 30-50% ├─ Customer satisfaction: Up (less bloat complaints) ├─ Response speed: Up 50-70% ├─ Conversion rate: Up (clarity beats verbosity) └─ Team morale: Up (shipped optimization, measurable ROI)

BOTTOM LINE:

Parsimony: AI models are bloated (proven). Your agent: Probably 2-3x excess tokens (invisible). Cost: $3-5k/month wasted (on 10k/month spend). Action: Optimize this week (measure, test, deploy). Timeline: 3-4 weeks to full ROI. Benefit: 30-50% cost savings + better customer experience. When to act: NOW (window closing fast).

Are you bloated?

→ OpenClaw: Prompt Optimization Blueprint (Bloat Detection, Lean Prompts, Output Constraints, Few-Shot Examples, Response Templates, ROI Tracking)

Parsimony: AI models bloated (50-200% excess). Seu agente? Provavelmente 2-3x tokens desnecessários (invisível). Cost: $3-5k/mês wasted. Como otimizar: Constraints + exemplos + templates. Timeline: 3-4 semanas. ROI: 30-50% cost down + UX up. Quando? AGORA. ⚡📉✨


Publicado em 14 de outubro de 2026

Leia também