/llm-observability:check-answer-consistencyfrom llm-observability
Scores LLM answer consistency across multiple samples to detect potential hallucinations without a reference answer. Useful for flagging low-confidence answers or routing to review.
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; scripts run unread.
A model that knows the answer repeats it across re-samples; a hallucinating model wanders. This skill ships a small consistency scorer that turns that idea into a number, with no reference answer required.
scripts/self_consistency.py is pure Python, no install needed:
from self_consistency import consistency_score, is_likely_hallucination
answers = [call_model(prompt, temperature=0.7) for _ in range(5)]
score = consistency_score(answers) # 1.0 = all agree, ~0 = all differ
if is_likely_hallucination(answers, threshold=0.5):
route_to_review()
Run it directly to see confident vs unsure examples: python scripts/self_consistency.py.
This is a lightweight SelfCheckGPT-style check (normalized-string agreement). For meaning-level robustness (wording differs but the fact is the same), move to entailment clustering / semantic entropy, see the detect-hallucinations skill.
Run the tests: pytest skills/check-answer-consistency/tests/. They confirm identical answers score 1.0 (ignoring case/punctuation/whitespace), all-different answers score low and flag, a 3-of-4 majority scores 0.75 and does not flag, and that fewer than two answers returns 0.0.
Consistency-based hallucination detection: SelfCheckGPT, Manakul et al. 2023 (arXiv:2303.08896). Meaning-level variant: semantic entropy, Farquhar et al., Nature 2024.
What SKILL.md sets; muted values are Claude Code's defaults
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./choose-observability-stackUse this to recommend an LLM observability / evaluation tool or stack for a specific situation. Trigger on "which observability tool should I use", "compare Langfuse vs Phoenix vs LangSmith", "what's the best LLM monitoring for us", or picking an eval/tracing/gateway tool given constraints (self-hosting, budget, compliance, existing stack). Ask about constraints, then recommend from the curated list - don't just name the most popular tool.npx claudepluginhub contextjet-ai/awesome-llm-observability --plugin llm-observabilityOther plugins' skills for the same job