/llm-observability:detect-hallucinationsfrom llm-observability
Detects LLM hallucinations using faithfulness checks for RAG/QA or self-consistency for open-ended generation. Helps block or flag confident-but-wrong answers.
Ships in llm-observability. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Hallucination detection scores how likely an answer is fabricated, so you can flag, block, or ask-for-review before it reaches a user. There is no single detector; pick by whether you have a ground-truth/context to check against.
You have retrieved context (RAG / QA): check faithfulness / groundedness - is every claim in the answer supported by the retrieved context?
add-llm-evals).You have no reference (open-ended generation): use consistency across samples - a model that knows the answer says the same thing across re-samples; a hallucinating model varies.
Cheap signals to combine: token log-probs / low confidence, and "I don't know"-style hedging. Weak alone, useful as features.
See references/methods.md for how each method works, cost/latency tradeoffs, and which libraries implement them.
instrument-llm-observability).monitor-rag-quality).Any detector has false positives/negatives. Label ~50 answers (hallucinated vs not) and tune the threshold to your tolerance - blocking flow favors recall (catch more), UX flow favors precision (fewer false blocks). Re-check after model changes.
Self-consistency: SelfCheckGPT, Manakul et al. 2023 (arXiv:2303.08896). Semantic entropy: Farquhar et al., Detecting hallucinations in large language models using semantic entropy, Nature 2024 (paper); cheaper variant, Semantic Entropy Probes (arXiv:2406.15927). LLM-as-a-judge: Zheng et al. 2023 (arXiv:2306.05685).
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
hallucination-detection, llm-evaluation, rag, qa, self-consistency, faithfulness
26 skills in this plugin
/add-llm-evalsUse this when adding evaluation to an LLM/agent app - measuring output quality (correctness, faithfulness, relevance, safety) rather than just watching traces. Trigger on "add evals", "test my prompt", "is my RAG accurate", "catch regressions", "score outputs", or setting up an eval suite in CI. Covers offline (CI) and online (production LLM-as-a-judge) evaluation./add-llm-fallbacksUse this to make an LLM app resilient to provider failures, rate limits, timeouts, and outages. Trigger on "handle LLM API errors", "add retries/fallbacks", "the app breaks when OpenAI is down", "rate limit errors", "make my LLM calls reliable", "timeout handling". Add retries, timeouts, and model/provider fallbacks, and observe them so failures are visible./add-llm-guardrailsUse this to add safety and security guardrails to an LLM/agent app - blocking prompt injection, PII leakage, jailbreaks, toxic output, off-topic responses, or invalid structured output. Trigger on "add guardrails", "prevent prompt injection", "stop PII leaks", "validate the model's output", "make this safe for production", especially for regulated/finance/enterprise use./annotate-traces-for-reviewUse this to set up human review and annotation of LLM traces, so people (often domain experts) can label outputs, do error analysis, and build a trustworthy golden dataset. Trigger on "review my LLM outputs", "have an expert label these", "error analysis", "annotate traces", "build a golden dataset", or when automated evals are not enough for a high-stakes or specialized domain. Looking at your data is the highest-ROI thing you can do./build-eval-datasetUse this to build a good evaluation dataset for an LLM app, the part everyone underestimates. Trigger on "make an eval set", "what should I test my LLM on", "I don't have test data for my prompt", "build a golden dataset", or before setting up evals. A great eval set beats a great metric; garbage-in means your evals lie to you./check-answer-consistencyUse this to get a cheap, reference-free signal that an LLM answer might be made up, by sampling the same prompt a few times and measuring agreement. Trigger on "is this answer reliable", "flag low-confidence answers", "cheap hallucination check", "confidence score without a ground truth", "self-consistency check". Ships a runnable, tested scorer you can put inline or on sampled traffic.npx claudepluginhub contextjet-ai/awesome-llm-observability --plugin llm-observabilityOther plugins' skills for the same job