Agent♥︎Age
Catalog

io.github.MukundaKatta/ragmetric-mcp

Official

by MukundaKatta · JavaScript

RAG retrieval IR metrics: recall@k, hit@k, MRR, NDCG@k, evaluate_batch.

This MCP server provides RAG retrieval evaluation metrics for an LLM to compute on demand. It focuses on information retrieval scoring functions including recall@k, hit@k, MRR, and NDCG@k, and includes an evaluate_batch helper to run the metrics across multiple queries.

🛠️ Key Features

  • Computes Recall@k, Hit@k, MRR, and NDCG@k
  • Binary relevance NDCG@k with log2 discount
  • evaluate_batch to evaluate multiple queries in one call
  • Exposes tools: recall_at_k(retrieved, relevant, k), hit_at_k(retrieved, relevant, k), mrr(retrieved, relevant), ndcg_at_k(retrieved, relevant, k)

🚀 Use Cases

  • Evaluate RAG retrieval performance for ranking quality
  • Score retrieved results against relevant items per query
  • Apply the same metrics to many queries via evaluate_batch

⚡ Developer Benefits

  • Standard metric coverage for IR evaluation (Recall@k, Hit@k, MRR, NDCG@k)
  • Clear tool signatures matching retrieved, relevant, and k inputs

⚠️ Limitations

  • Metrics are defined with binary relevance for NDCG@k; the readmeExcerpt does not describe graded relevance support.