Course contentsShow
← AI Engineering
Lesson 408 of 1,88610. RAG - Improving RetrievalFree lesson

Hit Rate and Coverage Metrics

Measuring what percentage of queries successfully retrieve at least one relevant document.

Hit Rate and Coverage Metrics

You'll learn: How to measure whether your retrieval system finds at least one relevant document for each query—a fundamental health check for RAG systems.

The Core Idea

Hit Rate (also called Coverage) answers a simple yes/no question for each query: Did we retrieve at least one relevant document?

Think of it like a safety net check. You're not asking "How many relevant docs did we find?" or "Were they ranked well?" You're asking: "Did we catch anything useful at all?"

For 100 queries, if 85 of them retrieved at least one relevant document, your hit rate is 85%. The remaining 15% are complete misses—queries where the retrieval returned nothing useful, leaving the generation step with no foundation.

Why This Matters

Hit rate tells you about the worst-case failures in your system. A low hit rate means many users get answers built on irrelevant context—or worse, hallucinations. It's your first-line diagnostic:

  • High hit rate (>90%): Your retrieval coverage is strong; focus on ranking quality (MRR, NDCG)
  • Low hit rate (<70%): You have fundamental retrieval gaps; expand your knowledge base or improve embeddings

Calculation

Hit Rate = (Number of queries with ≥1 relevant doc retrieved) / (Total queries)

Unlike precision or MRR, hit rate doesn't care about how many relevant docs you found or where they ranked—just that you found at least one.

Key Takeaway: Hit rate measures your retrieval system's basic coverage—the percentage of queries that successfully retrieve at least one relevant document, revealing fundamental gaps before fine-tuning ranking quality.