contextjet-ai/awesome-llm-observability/monitor-rag-quality

Claude Code and agent skill by contextjet-ai/awesome-llm-observability

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

Use this to measure and monitor the quality of a RAG (retrieval-augmented generation) pipeline - whether it retrieves the right context and answers faithfully. Trigger on "my RAG gives wrong answers", "is my retrieval any good", "the chatbot makes things up", "evaluate my RAG", "improve RAG accuracy". Diagnose whether the failure is in retrieval or generation - they need different fixes.

Install

npx vskill@latest install contextjet-ai/awesome-llm-observability/monitor-rag-quality

SKILL.md

Monitor & improve RAG quality

Most "the LLM is wrong" bugs in a RAG app are actually retrieval bugs - the model was handed the wrong context and did its best. Measure both halves separately.

The 4 metrics that matter (RAG quartet)

MetricQuestionWhich half
Context precisionAre the retrieved chunks relevant (not noise)?Retrieval
Context recallDid retrieval find all the needed info?Retrieval
FaithfulnessIs the answer grounded in the retrieved context (no made-up facts)?Generation
Answer relevanceDoes the answer actually address the question?Generation

Ragas implements all four; DeepEval and most observability platforms (Langfuse, Phoenix, Opik) have RAG evaluators too.

Diagnose: retrieval vs generation

Read a failing trace (see debug-agent-from-traces):

  • Low context recall/precision → fix retrieval: chunking strategy, embedding model, top-k, reranking, query rewriting, metadata filters. No amount of prompt tuning fixes missing context.
  • Good context but low faithfulness → fix generation: prompt the model to answer only from context, add a groundedness guardrail, lower temperature, cite sources.
  • Good context, hallucinates anyway → the model is ignoring context: tighten the prompt, or the context is too long and it's getting lost ("lost in the middle").

Set it up

  1. Build a small RAG eval set - 20-50 {question, ground-truth answer, ideal source docs} from real usage. Version it.
  2. Score offline in CI with the RAG quartet; set thresholds (e.g. faithfulness ≥ 0.8) that fail the build on regression.
  3. Score online - sample production traffic and run faithfulness + answer-relevance as LLM-as-a-judge on live traces; alert on drops.
  4. Log retrieval details in traces - query, retrieved doc IDs + scores - so every failure is diagnosable after the fact.

Verify

  • Intentionally remove a needed doc from the index → context recall drops (proves the metric works).
  • Intentionally prompt the model to ignore context → faithfulness drops.
  • A dashboard shows the four metrics over time with alert thresholds.

Anti-patterns

  • "Improving the prompt" when the real problem is retrieval returning garbage.
  • Only measuring the final answer, never the retrieved context (you can't tell which half failed).
  • Increasing top-k to "get more context" → adds noise, hurts precision, raises cost.
  • No RAG eval set → every change is a vibe, regressions ship silently.

Security

  • Security scanPassed, 90 of 100Pattern checks on the skill's files.
  • Model reviewPassed

Quality evaluation

  • Task evaluationNot runNo evaluation yet. Run one in Skill Studio.

Source

Popularity

7-day trend score
0

Not refreshed yet.

Works with

Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.

  • Claude Code
  • Cursor
  • GitHub Copilot
  • Windsurf
  • Codex
  • Gemini CLI
  • Cline
  • Amp
  • Roo Code
  • Goose
  • Continue
  • Kilo Code
  • Junie
  • Trae
  • OpenHands
  • Qwen Code
  • AI Agent
  • Tabnine Chat
  • Sourcegraph Cody
  • Amazon Q
  • Firebase Genkit
  • Sweep
  • Devin
  • Phind
  • Mentat
  • Claude Desktop
  • Aider
  • GPT Pilot
  • Plandex
  • bolt.new
  • v0
  • Replit Agent
  • Anse
  • TypingMind
  • BetterChatGPT
  • LibreChat
  • Warp AI
  • Pieces
  • Fig AI
Embed badge
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/contextjet-ai/awesome-llm-observability/monitor-rag-quality/badge)](https://verified-skill.com/skills/contextjet-ai/awesome-llm-observability/monitor-rag-quality)

Something wrong with this skill or its page? Tell us.