惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
J
Java Code Geeks
I
InfoQ
V
Visual Studio Blog
M
MIT News - Artificial intelligence
H
Help Net Security
博客园_首页
Blog — PlanetScale
Blog — PlanetScale
F
Fortinet All Blogs
Apple Machine Learning Research
Apple Machine Learning Research
人人都是产品经理
人人都是产品经理
G
Google Developers Blog
A
About on SuperTechFans
腾讯CDC
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Last Week in AI
Last Week in AI
小众软件
小众软件
aimingoo的专栏
aimingoo的专栏
罗磊的独立博客
大猫的无限游戏
大猫的无限游戏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
云风的 BLOG
云风的 BLOG
S
SegmentFault 最新的问题
WordPress大学
WordPress大学

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
How to Build a RAG Evaluation Framework That Catches Real...
Muhammad Zul · 2026-05-18 · via DEV Community

Six months into running a production RAG system, I had a problem: my users kept complaining about wrong answers, but my evaluation metrics looked fine. Retrieval accuracy: 87%. User satisfaction: 82%. Everything looked good on paper.

Then I sat with users for a week and watched them interact with the system.

The real problems were invisible to my metrics.

The Metrics You're Probably Using (And Why They're Not Enough)

Most RAG evaluation setups check:

  • Retrieval recall: "Did we get the relevant documents?"
  • Answer faithfulness: "Is the answer based on the retrieved content?"
  • Answer relevance: "Does the answer address the question?"

These are fine starting points. But they miss the failure modes that actually hurt users.

The Failure Modes Nobody Talks About

1. Temporal Confusion

Your system retrieved a correct document from 8 months ago. The policy changed 3 months ago. Your answer is confidently wrong.

Standard metrics: pass. Users: furious.

Fix: Track document age in your evaluation. Flag answers based on documents older than 30 days for manual review. Update your vector store on a schedule.

2. Partial Retrieval

User asks a compound question: "What are the refund limits for premium vs standard accounts?"

Your system retrieves the premium refund policy perfectly. Misses the standard account policy entirely.

Your retrieval recall: 50%. Your answer: half wrong. Your metrics: don't catch this.

Fix: Decompose compound questions before evaluation. Each sub-question needs its own retrieval check.

3. Confidence Calibration

Your model says "Based on the policy, the limit is $500." The document actually says "approximately $400-600 depending on account history."

The model collapsed a range into a specific number. Confidently. Wrongly.

Fix: Add a confidence calibration metric. Compare model confidence signals against actual document specificity.

4. The Hallucination in Context

This one is subtle. The document says X. The model retrieves it correctly. But the model's response adds context from its training data that contradicts X.

Faithfulness metrics typically catch obvious hallucinations. They miss when the model supplements retrieved content with training data.

Fix: Run a "context sufficiency" check. If the retrieved documents don't fully answer the question, flag it rather than letting the model fill gaps.

Building the Evaluation Framework

Here's what actually works in production:

Layer 1: Automated Metrics (Fast, Cheap)

  • Retrieval recall against a golden dataset
  • BERTScore for semantic similarity
  • Answer length relative to question complexity
  • Response time (slow = bad UX = user churn)

Cost: ~$0.002 per query to evaluate

Layer 2: LLM-as-Judge (Medium Cost, Medium Accuracy)

  • Have GPT-4 evaluate faithfulness and relevance
  • Check for temporal issues by passing document metadata
  • Flag compound question handling

Cost: ~$0.08 per query to evaluate (use on 10% of traffic)

Layer 3: Human Review (Expensive, Ground Truth)

  • Weekly review of 50 random flagged queries
  • Monthly review of edge cases identified by Layer 2
  • Quarterly user satisfaction interviews

Cost: $800-2,000/month in person-hours

The Feedback Loop That Matters

Every failed evaluation goes into a "failure taxonomy." Not just "wrong answer" — but why it was wrong.

After 3 months of this taxonomy, our top failure modes were:

  1. Temporal confusion: 34% of failures
  2. Compound question partial retrieval: 28%
  3. Confidence miscalibration: 19%
  4. Hallucination in context: 14%
  5. Other: 5%

This told us exactly where to invest engineering time.

The Numbers

Before framework: Users reported wrong answers 3-4 times per week.

After 3 months with the framework:

  • Temporal failures: down 71%
  • Compound question failures: down 58%
  • Overall wrong answer reports: down 64%

The evaluation framework cost us 40 engineering hours to build and $800/month to run. The reduction in support tickets saved $3,000/month.

What to Build First

If you're starting from scratch: build Layer 1 first. Get automated metrics running on every query. Create a golden dataset of 200 question-answer pairs that represent your most common use cases.

Run that for 30 days. The failure patterns will tell you what to build next.

Don't let perfect be the enemy of good. An imperfect evaluation framework running consistently beats a perfect one you're still designing.

Build the thing. Measure. Iterate.